(() => {
  let ele = {};
  //   if (history.back()) {
  //   }
  ele.top_img = $("#top_img");
  ele.fixedbtn1 = $(".fixedbtn1");
  ele.jilu = $("#jilu");
  ele.modal_record = $("#modal-record");
  ele.close_record = $("#close-record");
  ele.fixedbtn2 = $(".fixedbtn2");
  ele.modal_explian = $("#modal-explian");
  ele.close_explian = $("#close-explian");
  ele.list_primary = $("#list-primary");
  //   !111111111111111
  ele.chongxin = $("#chongxin");
  ele.chongkai1 = $("#chongkai1");
  ele.img1_3 = $("#img1_3");
  ele.img1_2 = $("#img1_2");
  ele.img_titbox1_3 = $("#img_titbox1_3");
  ele.img_titbox1_2 = $("#img_titbox1_2");
  ele.img_titbox1_1 = $("#img_titbox1_1");
  ele.img1_1 = $("#img1_1");
  ele.img_titbox2_1 = $("#img_titbox2_1");
  ele.img_titbox2_2 = $("#img_titbox2_2");
  ele.cardboth1 = $("#cardboth1");
  ele.img2_2 = $("#img2_2");
  ele.img2_1 = $("#img2_1");
  ele.img_titbox3_1 = $("#img_titbox3_1");
  ele.img3_2 = $("#img3_2");
  ele.img_titbox3_2 = $("#img_titbox3_2");
  ele.img_titbox3_3 = $("#img_titbox3_3");
  ele.img3_1 = $("#img3_1");
  ele.img3_3 = $("#img3_3");
  ele.cardboth4 = $("#cardboth4");
  ele.img4_1 = $("#img4_1");
  ele.img_titbox4_1 = $("#img_titbox4_1");
  ele.img4_2 = $("#img4_2");
  ele.img_titbox4_2 = $("#img_titbox4_2");
  ele.cardthree3 = $("#cardthree3");
  ele.img5_1 = $("#img5_1");
  ele.cardthree5 = $("#cardthree5");
  ele.img_titbox5_1 = $("#img_titbox5_1");
  ele.img5_2 = $("#img5_2");
  ele.img_titbox5_2 = $("#img_titbox5_2");
  ele.img5_3 = $("#img5_3");
  ele.img_titbox5_3 = $("#img_titbox5_3");
  ele.cardboth6 = $("#cardboth6");
  ele.img6_1 = $("#img6_1");
  ele.img_titbox6_1 = $("#img_titbox6_1");
  ele.img6_2 = $("#img6_2");
  ele.img_titbox6_2 = $("#img_titbox6_2");
  ele.bao_top = $("#bao_top");
  ele.bao_top3 = $("#bao_top3");
  ele.bao_top2 = $("#bao_top2");
  ele.son_bao1 = $("#son_bao1");
  ele.son_bao2 = $("#son_bao2");
  ele.son_bao3 = $("#son_bao3");
  ele.option_primary = $("#option-primary");
  ele.option_middle = $("#option-middle");
  ele.option_senior = $("#option-senior");
  ele.list_jilu = $("#list_jilu");
  ele.more = $("#more");
  ele.empty = $("#empty");
  ele.meiyou = $("#meiyou");
  ele.onepaw = $("#onepaw");
  ele.onepaw2 = $("#onepaw2");
  ele.onepaw3 = $("#onepaw3");
  let list1 = [];
  let tansuo = [];
  let my_pow = 0;
  let page = 1;

  let onepaw = 0;
  let onepaw2 = 0;
  let onepaw3 = 0;
  //   第一个记录
  let jiluList1 = [];
  let state = 0;
  //   目前在那个等级游戏
  let id = 1;
  let paiid = 0;
  let topId = 0;
  let one1 = 0;
  // !tabbar改变
  ele.option_primary.onmouseup = () => {
    list1 = [];
    state = 0;
    paiid = 1;

    onePage();
  };
  ele.option_middle.onmouseup = () => {
    onePage2();
  };
  ele.option_senior.onmouseup = () => {
    onePage3();
  };

  // 刘欣 引导 返回到矿山 从探索 2023-6-23 06:48:27
  ele.top_img.onclick = () => {
    let ugid = guide.getUsersGuideId();
    if (~[184].indexOf(ugid)) guide.hideSearch_184();
    history.back();
  };

  //打开 探索记录
  for (let i = 0; i < ele.fixedbtn1.length; i++) {
    ele.fixedbtn1[i].onclick = (e) => {
      tansuojilus();
      openMdl(ele.modal_record);
    };
  }

  //关闭 探索记录
  ele.close_record.onclick = () => {
    page = 1;
    jiluList1 = [];
    closeMdl(ele.modal_record);
  };

  //打开 探索记录
  for (let i = 0; i < ele.fixedbtn2.length; i++) {
    ele.fixedbtn2[i].onclick = (e) => {
      openMdl(ele.modal_explian);
    };
  }
  // todos!探索记录----------------------------------------
  function tansuojilus() {
    let token = getCookie("token");
    ajax({
      method: "get",
      url: API_PATH.TANSUOJILU,
      header: {
        Authorization: token,
      },
      success: (res) => {
        if (res.code == 1) {
          obj = res.data.detail;
          jiluList1 = [...jiluList1, ...res.data.data];

          if (jiluList1.length === 0) {
            page = 0;
            ele.more.style.display = "none";
            ele.empty.style.display = "block";
          } else {
            initList();
            page++;
            if (page > res.data.last_page) {
              ele.more.innerText = "没有更多了";
              ele.more.onclick = null;
            } else {
              ele.more.innerText = "加载更多";
              ele.more.onclick = () => tansuojilus(page);
            }
          }
        } else openTips(res.msg);
        initList();
      },
      error: (err) => {
        // openTips(err.msg);
      },
    });
  }
  function initList() {
    let newList = jiluList1
      .map((item) => {
        return `<div class="navlist">
					<span>${item.created_at}</span>
					<p>${item.info.win.info.name}</p>
					<div class="">
					${item.info.win.num}
					</div>
						</div>`;
      })
      .join(" ");
    ele.list_jilu.innerHTML = newList;
  }
  //关闭 探索记录
  ele.close_explian.onclick = () => {
    page = 1;
    jiluList1 = [];
    closeMdl(ele.modal_explian);
  };
  // !第一个
  onePage();
  function onePage() {
    let time = 0;
    let img1All = document.querySelectorAll(".img_1");
    let code = 0;

    // !第一个点击重新开始？？？？？？？？？？？？？？？？？？？？？
    ele.chongkai1.onclick = () => {
      co = 1;
      upData();
      setTimeout(() => {
        onePage();
        id = 0;
        topId = 0;
        list1 = [];

        // !上面的宝箱
        // 下面的绿点
        let n = document.querySelectorAll(".img_titbox");
        n.forEach((item) => {
          item.innerHTML = " ";
        });
        img1All.forEach((item) => {
          item.classList.remove("img1");
          item.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/green.png";
        });
        ele.son_bao1.innerHTML = " ";
        ele.son_bao2.innerHTML = " ";
        ele.son_bao3.innerHTML = " ";
        ele.bao_top.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        ele.bao_top2.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        ele.bao_top3.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
      }, 2000);
      // onePage();
    };

    // !翻牌记录!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    jilu();
    function jilu() {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.FANPAIJI,
        header: {
          Authorization: token,
        },
        data: {
          id: id,
        },
        success: (res) => {
          ele.onepaw.innerHTML = `${res.data.power[0].money}能量探索一次`;
          ele.onepaw2.innerHTML = `${res.data.power[1].money}能量探索一次`;
          ele.onepaw3.innerHTML = `${res.data.power[2].money}能量探索一次`;
          if (res.data.list.length == 0) {
            return;
          }
          if (id == 1) {
            paiid = res.data.list.length;
            topId = res.data.list.length;
            jiluTree(res.data.list);
            //   渲染数据
            xuanranState();
          }
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
    }
    // !用来统计记录-----------
    function jiluTree(list) {
      let newList = [];
      list.forEach((item) => {
        if (item.info.lose.length == 2) {
          newList.push([
            {
              wz: item.wz,
              name: item.info.win.info.b_type
                ? item.info.win.info.name
                : "道具",
              img: item.info.win.info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.win.info.logo,
              num: item.info.win.num,
            },
            {
              name: item.info.lose[0].info.b_type
                ? item.info.lose[0].info.name
                : "道具",
              img: item.info.lose[0].info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.lose[0].info.logo,
              num: item.info.lose[0].num,
            },
            {
              name: item.info.lose[1].info.b_type ? win.info.name : "道具",
              img: item.info.lose[1].info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.lose[1].info.logo,
              num: item.info.lose[1].num,
            },
          ]);
        } else if (item.info.lose.length == 1) {
          newList.push([
            {
              wz: item.wz,
              name: item.info.win.info.b_type
                ? item.info.win.info.name
                : "道具",
              img: item.info.win.info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.win.info.logo,
              num: item.info.win.num,
            },
            {
              name: item.info.lose[0].info.b_type
                ? item.info.lose[0].info.name
                : "道具",
              img: item.info.lose[0].info.logo
                ? IMG_DOMAIN + item.info.lose[0].info.logo
                : "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png",
              num: item.info.lose[0].num,
            },
          ]);
        }
        list1 = newList;
        return newList;
      });
    }
    //   todo渲染记录----------------------------------------------------------
    function xuanranState() {
      try {
        if (list1[0][0].wz == 1) {
          // todo调用翻拍接口
          ele.img1_1.classList.add("img1");
          setTimeout(() => {
            ele.img1_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox1_1.innerHTML = `<p class="img_span">${list1[0][0].name}</p>
												  <img class="jinbi_img" src="${list1[0][0].img}" alt="">
												  <span>${list1[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img1_3.classList.add("img1");
            setTimeout(() => {
              ele.img1_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox1_3.innerHTML = `<p class="img_span">${list1[0][2].name}</p>
												  <img class="jinbi_img" src="${list1[0][2].img}" alt="">
												  <span>${list1[0][2].num}</span>`;
            }, 500);
            ele.img1_2.classList.add("img1");
            setTimeout(() => {
              ele.img1_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox1_2.innerHTML = `<p class="img_span">${list1[0][1].name}</p>
												  <img class="jinbi_img" src="${list1[0][1].img}" alt="">
												  <span>${list1[0][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1[0][0].wz == 2) {
          ele.img1_2.classList.add("img1");
          setTimeout(() => {
            ele.img1_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox1_2.innerHTML = `<p class="img_span">${list1[0][0].name}</p>
													  <img class="jinbi_img" src="${list1[0][0].img}" alt="">
													  <span>${list1[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            id = 1;
            ele.img1_1.classList.add("img1");
            setTimeout(() => {
              ele.img1_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox1_1.innerHTML = `<p class="img_span">${list1[0][1].name}</p>
												  <img class="jinbi_img" src="${list1[0][1].img}" alt="">
												  <span>${list1[0][1].num}</span>`;
            }, 500);
            ele.img1_3.classList.add("img1");
            setTimeout(() => {
              ele.img1_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox1_3.innerHTML = `<p class="img_span">${list1[0][2].name}</p>
												  <img class="jinbi_img" src="${list1[0][2].img}" alt="">
												  <span>${list1[0][2].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1[0][0].wz == 3) {
          ele.img1_3.classList.add("img1");
          setTimeout(() => {
            ele.img1_3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img1_3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox1_3.innerHTML = `<p class="img_span">${list1[0][0].name}</p>
												  <img class="jinbi_img" src="${list1[0][0].img}" alt="">
												  <span>${list1[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img1_1.classList.add("img1");
            setTimeout(() => {
              ele.img1_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox1_1.innerHTML = `<p class="img_span">${list1[0][2].name}</p>
												  <img class="jinbi_img" src="${list1[0][2].img}" alt="">
												  <span>${list1[0][2].num}</span>`;
            }, 500);
            ele.img1_2.classList.add("img1");
            setTimeout(() => {
              ele.img1_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox1_2.innerHTML = `<p class="img_span">${list1[0][1].name}</p>
													  <img class="jinbi_img" src="${list1[0][1].img}" alt="">
													  <span>${list1[0][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        if (list1[1][0].wz == 1) {
          ele.img2_1.classList.add("img1");
          setTimeout(() => {
            ele.img2_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox2_1.innerHTML = `<p class="img_span">${list1[1][0].name}</p>
												  <img class="jinbi_img" src="${list1[1][0].img}" alt="">
												  <span>${list1[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img2_2.classList.add("img1");
            setTimeout(() => {
              ele.img2_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox2_2.innerHTML = `<p class="img_span">${list1[1][1].name}</p>
												  <img class="jinbi_img" src="${list1[1][1].img}" alt="">
												  <span>${list1[1][1].num}</span>`;
            }, 500);
            ele.img2_2.classList.add("img1");
          }, 2000);
        } else if (list1[1][0].wz == 2) {
          ele.img2_2.classList.add("img1");
          setTimeout(() => {
            ele.img2_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox2_2.innerHTML = `<p class="img_span">${list1[1][0].name}</p>
												  <img class="jinbi_img" src="${list1[1][0].img}" alt="">
												  <span>${list1[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img2_1.classList.add("img1");
            setTimeout(() => {
              ele.img2_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox2_1.innerHTML = `<p class="img_span">${list1[1][1].name}</p>
												  <img class="jinbi_img" src="${list1[1][1].img}" alt="">
												  <span>${list1[1][1].num}</span>`;
            }, 500);
            ele.img2_1.classList.add("img1");
          }, 2000);
        }
        if (list1[2][0].wz == 1) {
          ele.img3_1.classList.add("img1");
          setTimeout(() => {
            ele.img3_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox3_1.innerHTML = `<p class="img_span">${list1[2][0].name}</p>
												  <img class="jinbi_img" src="${list1[2][0].img}" alt="">
												  <span>${list1[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img3_3.classList.add("img1");
            setTimeout(() => {
              ele.img3_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_3.innerHTML = `<p class="img_span">${list1[2][2].name}</p>
												  <img class="jinbi_img" src="${list1[2][2].img}" alt="">
												  <span>${list1[2][2].num}</span>`;
            }, 500);
            ele.img3_2.classList.add("img1");
            setTimeout(() => {
              ele.img3_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_2.innerHTML = `<p class="img_span">${list1[2][1].name}</p>
												  <img class="jinbi_img" src="${list1[2][1].img}" alt="">
												  <span>${list1[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1[0][0].wz == 2) {
          ele.img3_2.classList.add("img1");
          setTimeout(() => {
            ele.img3_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox3_2.innerHTML = `<p class="img_span">${list1[2][0].name}</p>
												  <img class="jinbi_img" src="${list1[2][0].img}" alt="">
												  <span>${list1[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img3_3.classList.add("img1");
            setTimeout(() => {
              ele.img3_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_3.innerHTML = `<p class="img_span">${list1[2][2].name}</p>
												  <img class="jinbi_img" src="${list1[2][2].img}" alt="">
												  <span>${list1[2][2].num}</span>`;
            }, 500);
            ele.img3_1.classList.add("img1");
            setTimeout(() => {
              ele.img3_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_1.innerHTML = `<p class="img_span">${list1[2][1].name}</p>
												  <img class="jinbi_img" src="${list1[2][1].img}" alt="">
												  <span>${list1[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1[0][0].wz == 3) {
          ele.img3_3.classList.add("img1");
          setTimeout(() => {
            ele.img3_3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox3_3.innerHTML = `<p class="img_span">${list1[2][0].name}</p>
												  <img class="jinbi_img" src="${list1[2][0].img}" alt="">
												  <span>${list1[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img3_2.classList.add("img1");
            setTimeout(() => {
              ele.img3_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_2.innerHTML = `<p class="img_span">${list1[2][2].name}</p>
												  <img class="jinbi_img" src="${list1[2][2].img}" alt="">
												  <span>${list1[2][2].num}</span>`;
            }, 500);
            ele.img3_1.classList.add("img1");
            setTimeout(() => {
              ele.img3_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_1.innerHTML = `<p class="img_span">${list1[2][1].name}</p>
												  <img class="jinbi_img" src="${list1[2][1].img}" alt="">
												  <span>${list1[2][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        // 第四个
        if (list1[3][0].wz == 1) {
          // 第四个
          // todo调用翻拍接口
          ele.img4_1.classList.add("img1");
          setTimeout(() => {
            ele.img4_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox4_1.innerHTML = `<p class="img_span">${list1[3][0].name}</p>
													<img class="jinbi_img" src="${list1[3][0].img}" alt="">
													<span>${list1[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img4_2.classList.add("img1");
            setTimeout(() => {
              ele.img4_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox4_2.innerHTML = `<p class="img_span">${list1[3][1].name}</p>
													<img class="jinbi_img" src="${list1[3][1].img}" alt="">
													<span>${list1[3][1].num}</span>`;
            }, 500);
            ele.img4_2.classList.add("img1");
          }, 2000);
        } else if (list1[3][0].wz == 2) {
          ele.img4_2.classList.add("img1");
          setTimeout(() => {
            ele.img4_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox4_2.innerHTML = `<p class="img_span">${list1[3][0].name}</p>
													<img class="jinbi_img" src="${list1[3][0].img}" alt="">
													<span>${list1[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img4_1.classList.add("img1");
            setTimeout(() => {
              ele.img4_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox4_1.innerHTML = `<p class="img_span">${list1[3][1].name}</p>
													<img class="jinbi_img" src="${list1[3][1].img}" alt="">
													<span>${list1[3][1].num}</span>`;
            }, 500);
            ele.img4_1.classList.add("img1");
          }, 2000);
        }
        // 第五个
        if (list1[4][0].wz == 1) {
          ele.img5_1.classList.add("img1");
          setTimeout(() => {
            ele.img5_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox5_1.innerHTML = `<p class="img_span">${list1[4][0].name}</p>
												  <img class="jinbi_img" src="${list1[4][0].img}" alt="">
												  <span>${list1[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img5_3.classList.add("img1");
            setTimeout(() => {
              ele.img5_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_3.innerHTML = `<p class="img_span">${list1[4][2].name}</p>
												  <img class="jinbi_img" src="${list1[4][2].img}" alt="">
												  <span>${list1[4][2].num}</span>`;
            }, 500);
            ele.img5_2.classList.add("img1");
            setTimeout(() => {
              ele.img5_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_2.innerHTML = `<p class="img_span">${list1[4][1].name}</p>
												  <img class="jinbi_img" src="${list1[4][1].img}" alt="">
												  <span>${list1[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1[4][0].wz == 2) {
          ele.img5_2.classList.add("img1");
          setTimeout(() => {
            ele.img5_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox5_2.innerHTML = `<p class="img_span">${list1[4][0].name}</p>
												  <img class="jinbi_img" src="${list1[4][0].img}" alt="">
												  <span>${list1[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_3.classList.add("img1");
            setTimeout(() => {
              ele.img5_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_3.innerHTML = `<p class="img_span">${list1[4][2].name}</p>
												  <img class="jinbi_img" src="${list1[4][2].img}" alt="">
												  <span>${list1[4][2].num}</span>`;
            }, 500);
            ele.img5_1.classList.add("img1");
            setTimeout(() => {
              ele.img5_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_1.innerHTML = `<p class="img_span">${list1[4][1].name}</p>
												  <img class="jinbi_img" src="${list1[4][1].img}" alt="">
												  <span>${list1[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1[4][0].wz == 3) {
          ele.img5_3.classList.add("img1");
          setTimeout(() => {
            ele.img5_3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox5_3.innerHTML = `<p class="img_span">${list1[4][0].name}</p>
												  <img class="jinbi_img" src="${list1[4][0].img}" alt="">
												  <span>${list1[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_2.classList.add("img1");
            setTimeout(() => {
              ele.img5_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_2.innerHTML = `<p class="img_span">${list1[4][2].name}</p>
												  <img class="jinbi_img" src="${list1[4][2].img}" alt="">
												  <span>${list1[4][2].num}</span>`;
            }, 500);
            ele.img5_1.classList.add("img1");
            setTimeout(() => {
              ele.img5_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_1.innerHTML = `<p class="img_span">${list1[4][1].name}</p>
												  <img class="jinbi_img" src="${list1[4][1].img}" alt="">
												  <span>${list1[4][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        //   第六个
        if (list1[5][0].wz == 1) {
          ele.img6_1.classList.add("img1");
          setTimeout(() => {
            ele.img6_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox6_1.innerHTML = `<p class="img_span">${list1[5][0].name}</p>
													<img class="jinbi_img" src="${list1[5][0].img}" alt="">
													<span>${list1[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img6_2.classList.add("img1");
            setTimeout(() => {
              ele.img6_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox6_2.innerHTML = `<p class="img_span">${list1[5][1].name}</p>
													<img class="jinbi_img" src="${list1[5][1].img}" alt="">
													<span>${list1[5][1].num}</span>`;
            }, 500);
            ele.img6_2.classList.add("img1");
          }, 2000);
        } else if (list1[5][0].wz == 2) {
          ele.img6_2.classList.add("img1");
          setTimeout(() => {
            ele.img6_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox6_2.innerHTML = `<p class="img_span">${list1[5][0].name}</p>
													<img class="jinbi_img" src="${list1[5][0].img}" alt="">
													<span>${list1[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img6_1.classList.add("img1");
            setTimeout(() => {
              ele.img6_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox6_1.innerHTML = `<p class="img_span">${list1[5][1].name}</p>
													<img class="jinbi_img" src="${list1[5][0].img}" alt="">
													<span>${list1[5][1].num}</span>`;
            }, 500);
            ele.img6_1.classList.add("img1");
          }, 2000);
        }
        // 第七个
        if (list1[6][0].wz == 1) {
          setTimeout(() => {
            if (
              list1[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao1.innerHTML = `
						<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1.innerHTML = `<img class="sonbox_img" src="${list1[6][0].img}" alt="">
																<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1[6][1].name == "金币") {
              ele.son_bao2.innerHTML = `
						<span class="num">x${list1[6][1].num}</span>`;
              ele.bao_top2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2.innerHTML = `<img class="sonbox_img" src="${list1[6][1].img}" alt="">
																<span class="num">x${list1[6][1].num}</span>`;
              ele.bao_top2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1[6][2].name == "金币") {
              ele.son_bao3.innerHTML = `
						<span class="num">x${list1[6][2].num}</span>`;
              ele.bao_top3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3.innerHTML = `<img class="sonbox_img" src="${list1[6][2].img}" alt="">
																<span class="num">x${list1[6][2].num}</span>`;
              ele.bao_top3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        } else if (list1[6][0].wz == 2) {
          setTimeout(() => {
            if (
              list1[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao2.innerHTML = `
						<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2.innerHTML = `<img class="sonbox_img" src="${list1[6][0].img}" alt="">
																<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1[6][1].name == "金币") {
              ele.son_bao3.innerHTML = `
						<span class="num">x${list1[6][1].num}</span>`;
              ele.bao_top3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3.innerHTML = `<img class="sonbox_img" src="${list1[6][1].img}" alt="">
																<span class="num">x${list1[6][1].num}</span>`;
              ele.bao_top3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1[6][2].name == "金币") {
              ele.son_bao1.innerHTML = `
						<span class="num">x${list1[6][2].num}</span>`;
              ele.bao_top.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1.innerHTML = `<img class="sonbox_img" src="${list1[6][2].img}" alt="">
																<span class="num">x${list1[6][2].num}</span>`;
              ele.bao_top.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        } else if (list1[6][0].wz == 3) {
          // !是金币
          setTimeout(() => {
            if (
              list1[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao3.innerHTML = `
					<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3.innerHTML = `<img class="sonbox_img" src="${list1[6][0].img}" alt="">
															<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1[6][1].name == "金币") {
              ele.son_bao1.innerHTML = `
					<span class="num">x${list1[6][1].num}</span>`;
              ele.bao_top.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1.innerHTML = `<img class="sonbox_img" src="${list1[6][1].img}" alt="">
															<span class="num">x${list1[6][1].num}</span>`;
              ele.bao_top.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1[6][2].name == "金币") {
              ele.son_bao2.innerHTML = `
					<span class="num">x${list1[6][2].num}</span>`;
              ele.bao_top2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2.innerHTML = `<img class="sonbox_img" src="${list1[6][2].img}" alt="">
															<span class="num">x${list1[6][2].num}</span>`;
              ele.bao_top2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        }
      } catch (error) {
        // console.log(error);
      }
    }
    // ! 重新开始
    function upData() {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.CHONGXINKAISHI,
        header: {
          Authorization: token,
        },
        data: {
          lv: id,
        },
        success: (res) => {
          openTips(res.msg);
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
    }
    //   !第一页第一个--------------------------------------------------------------------

    ele.img1_1.onclick = () => {
      // if (state == 1) {
      //   ele.img1_1.onclick = null;
      // }
      id = 1;
      state = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 1, 1);
      if (n == 1) {
        return;
      }
      ele.img1_3.onclick = null;
      ele.img1_2.onclick = null;
      ele.img1_1.classList.add("img1");

      setTimeout(() => {
        if (paiid == 0) {
          return;
        }
        if (code == 1) {
          return;
        }
        ele.img1_1.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
        ele.img_titbox1_1.innerHTML = `<p class="img_span">${list1[0][0].name}</p>
		  
												  <img class="jinbi_img" src="${list1[0][0].img}" alt="">
												  <span>${list1[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        openTips(`恭喜获得${list1[0][0].name}x${list1[0][0].num}`);
      }, 900);
      // todo打开其他两个
      setTimeout(() => {
        if (paiid == 0) {
          return;
        }
        if (code == 1) {
          return;
        }
        ele.img1_3.classList.add("img1");
        setTimeout(() => {
          ele.img1_3.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox1_3.innerHTML = `<p class="img_span">${list1[0][2].name}</p>
												  <img class="jinbi_img" src="${list1[0][2].img}" alt="">
												  <span>${list1[0][2].num}</span>`;
        }, 500);
        ele.img1_2.classList.add("img1");
        setTimeout(() => {
          ele.img1_2.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox1_2.innerHTML = `<p class="img_span">${list1[0][1].name}</p>
												  <img class="jinbi_img" src="${list1[0][1].img}" alt="">
												  <span>${list1[0][1].num}</span>`;
        }, 500);
      }, 2000);
    };
    //   !第一页第二个
    ele.img1_2.onclick = () => {
      // if (state == 1) {
      //   ele.img1_2.onclick = null;
      // }
      id = 1;
      state = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 2);
      if (n == 1) {
        return;
      }
      ele.img1_1.onclick = null;
      ele.img1_3.onclick = null;
      ele.img1_2.classList.add("img1");
      setTimeout(() => {
        if (paiid == 0) {
          return;
        }
        if (code == 1) {
          return;
        }
        ele.img1_2.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
        ele.img_titbox1_2.innerHTML = `<p class="img_span">${list1[0][0].name}</p>
													  <img class="jinbi_img" src="${list1[0][0].img}" alt="">
													  <span>${list1[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
      }, 900);
      // todo打开其他两个
      setTimeout(() => {
        if (paiid == 0) {
          return;
        }
        if (code == 1) {
          return;
        }
        id = 1;
        ele.img1_1.classList.add("img1");
        setTimeout(() => {
          ele.img1_1.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox1_1.innerHTML = `<p class="img_span">${list1[0][1].name}</p>
												  <img class="jinbi_img" src="${list1[0][1].img}" alt="">
												  <span>${list1[0][1].num}</span>`;
        }, 500);
        ele.img1_3.classList.add("img1");
        setTimeout(() => {
          ele.img1_3.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox1_3.innerHTML = `<p class="img_span">${list1[0][2].name}</p>
												  <img class="jinbi_img" src="${list1[0][2].img}" alt="">
												  <span>${list1[0][2].num}</span>`;
        }, 500);
      }, 2000);
    };
    //   !第一页第三个
    ele.img1_3.onclick = () => {
      // if (state == 1) {
      //   ele.img1_3.onclick = null;
      // }
      id = 1;
      state = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 3);
      if (n == 1) return;
      ele.img1_1.onclick = null;
      ele.img1_2.onclick = null;
      ele.img1_3.classList.add("img1");
      setTimeout(() => {
        if (paiid == 0) {
          return;
        }
        if (code == 1) {
          return;
        }
        ele.img1_3.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
        ele.img1_3.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
        ele.img_titbox1_3.innerHTML = `<p class="img_span">${list1[0][0].name}</p>
												  <img class="jinbi_img" src="${list1[0][0].img}" alt="">
												  <span>${list1[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
      }, 900);
      // todo打开其他两个
      setTimeout(() => {
        if (paiid == 0) {
          return;
        }
        if (code == 1) {
          return;
        }
        ele.img1_1.classList.add("img1");
        setTimeout(() => {
          ele.img1_1.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox1_1.innerHTML = `<p class="img_span">${list1[0][2].name}</p>
												  <img class="jinbi_img" src="${list1[0][2].img}" alt="">
												  <span>${list1[0][2].num}</span>`;
        }, 500);
        ele.img1_2.classList.add("img1");
        setTimeout(() => {
          ele.img1_2.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox1_2.innerHTML = `<p class="img_span">${list1[0][1].name}</p>
													  <img class="jinbi_img" src="${list1[0][1].img}" alt="">
													  <span>${list1[0][1].num}</span>`;
        }, 500);
      }, 2000);
    };
    let show = 2;
    //   !第二个翻拍------------------------------------------------------------------
    ele.cardboth1.onclick = (e) => {
      if (topId == 0) return;
      if (show == 1) {
        ele.cardboth1.onclick = null;
        return;
      }
      if (paiid != 1) {
        return;
      }
      // if (one1 != 1) {
      //   return;
      // }
      if (e.target.dataset.num == 1) {
        show = 1;
        console.log(show, "123");

        id = 1;
        state = 2;
        // todo调用翻拍接口
        let n = fanpai(1, 1);
        if (n == 1) return;
        ele.img2_1.classList.add("img1");
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img2_1.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox2_1.innerHTML = `<p class="img_span">${list1[1][0].name}</p>
												  <img class="jinbi_img" src="${list1[1][0].img}" alt="">
												  <span>${list1[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 800);
        // todo打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img2_2.classList.add("img1");
          setTimeout(() => {
            ele.img2_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox2_2.innerHTML = `<p class="img_span">${list1[1][1].name}</p>
												  <img class="jinbi_img" src="${list1[1][1].img}" alt="">
												  <span>${list1[1][1].num}</span>`;
          }, 500);
          ele.img2_2.classList.add("img1");
        }, 2000);
        return;
      } else if (e.target.dataset.num == 2) {
        show = 1;
        if (topId == 0) return;
        if (paiid != 1) {
          return;
        }
        id = 1;
        state = 2;
        // todo调用翻拍接口
        let n = fanpai(1, 2);
        if (n == 1) return;
        ele.img2_2.classList.add("img1");
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img2_2.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox2_2.innerHTML = `<p class="img_span">${list1[1][0].name}</p>
												  <img class="jinbi_img" src="${list1[1][0].img}" alt="">
												  <span>${list1[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img2_1.classList.add("img1");
          setTimeout(() => {
            ele.img2_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox2_1.innerHTML = `<p class="img_span">${list1[1][1].name}</p>
												  <img class="jinbi_img" src="${list1[1][1].img}" alt="">
												  <span>${list1[1][1].num}</span>`;
          }, 500);
          ele.img2_1.classList.add("img1");
        }, 2000);
        return;
      }
    };
    //   !第四个翻拍------------------------------------------------------------------
    let show4 = 2;
    ele.cardboth4.onclick = (e) => {
      if (show4 == 1) {
        ele.cardboth4.onclick = null;
        return;
      }
      if (paiid != 3) {
        return;
      }
      if (e.target.dataset.num == 1) {
        show4 = 1;
        id = 1;
        state = 4;
        // todo调用翻拍接口
        let n = fanpai(1, 1);
        if (n == 1) return;
        ele.img4_1.classList.add("img1");
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img4_1.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox4_1.innerHTML = `<p class="img_span">${list1[3][0].name}</p>
													<img class="jinbi_img" src="${list1[3][0].img}" alt="">
													<span>${list1[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img4_2.classList.add("img1");
          setTimeout(() => {
            ele.img4_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox4_2.innerHTML = `<p class="img_span">${list1[3][1].name}</p>
													<img class="jinbi_img" src="${list1[3][1].img}" alt="">
													<span>${list1[3][1].num}</span>`;
          }, 500);
          ele.img4_2.classList.add("img1");
        }, 2000);
        return;
      } else {
        show4 = 1;
        id = 1;
        state = 4;
        // todo调用翻拍接口
        let n = fanpai(1, 2);
        if (n == 1) return;
        ele.img4_2.classList.add("img1");
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img4_2.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox4_2.innerHTML = `<p class="img_span">${list1[3][0].name}</p>
													<img class="jinbi_img" src="${list1[3][0].img}" alt="">
													<span>${list1[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img4_1.classList.add("img1");
          setTimeout(() => {
            ele.img4_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox4_1.innerHTML = `<p class="img_span">${list1[3][1].name}</p>
													<img class="jinbi_img" src="${list1[3][1].img}" alt="">
													<span>${list1[3][1].num}</span>`;
          }, 500);
          ele.img4_1.classList.add("img1");
        }, 2000);
        return;
      }
    };
    let show6 = 2;
    //   !第六个翻拍------------------------------------------------------------------
    ele.cardboth6.onclick = (e) => {
      if (show6 == 1) {
        ele.cardboth6.onclick = null;
        return;
      }
      // !----------------------------------改的
      if (paiid != 5) {
        return;
      }
      // if (my_pow < 600) return openTips("能量不足");
      if (e.target.dataset.num == 1) {
        show6 = 1;
        id = 1;
        state = 6;
        // todo调用翻拍接口
        let n = fanpai(1, 1);
        if (n == 1) return;
        ele.img6_1.classList.add("img1");
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img6_1.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox6_1.innerHTML = `<p class="img_span">${list1[5][0].name}</p>
													<img class="jinbi_img" src="${list1[5][0].img}" alt="">
													<span>${list1[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img6_2.classList.add("img1");
          setTimeout(() => {
            ele.img6_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox6_2.innerHTML = `<p class="img_span">${list1[5][1].name}</p>
													<img class="jinbi_img" src="${list1[5][1].img}" alt="">
													<span>${list1[5][1].num}</span>`;
          }, 500);
          ele.img6_2.classList.add("img1");
        }, 2000);
        return;
      } else {
        show6 = 1;
        // if (my_pow < 600) return openTips("能量不足");
        id = 1;
        state = 6;
        // todo调用翻拍接口
        let n = fanpai(1, 2);
        if (n == 1) return;
        ele.img6_2.classList.add("img1");
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img6_2.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
          ele.img_titbox6_2.innerHTML = `<p class="img_span">${list1[5][0].name}</p>
													<img class="jinbi_img" src="${list1[5][0].img}" alt="">
													<span>${list1[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          ele.img6_1.classList.add("img1");
          setTimeout(() => {
            ele.img6_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox6_1.innerHTML = `<p class="img_span">${list1[5][1].name}</p>
													<img class="jinbi_img" src="${list1[5][1].img}" alt="">
													<span>${list1[5][1].num}</span>`;
          }, 500);
          ele.img6_1.classList.add("img1");
        }, 2000);
        return;
      }
    };
    //! 第三个翻牌----------------------------------------------------------------
    choujiang3();
    //! 第五个翻牌----------------------------------------------------------------
    choujiang5();
    //   !第七个---------------------------------------------------------------=----
    choujiang7();
    function fanpai(idnum, weizhi) {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.FANPAIJILU,
        header: {
          Authorization: token,
        },
        data: {
          lv: id,
          cen: state,
          wz: weizhi,
        },
        success: (res) => {
          if (res.code == 1) {
            openTips(`恭喜获得${res.data.win.info.name}x${res.data.win.num}`);
          }
          if (res.msg == "能量不足！") {
            openTips(res.msg);
            code = 1;
            return "1";
          }
          // if (res.msg == "请按顺序进行挖掘！") {
          //   code = 1;
          //   return "1";
          // }
          // if (res.msg == "请不要操作过快！") {
          //   code = 1;
          //   return "1";
          // }
          if (res.code == 0) {
            // code = 1;
            if (state == 1) {
              // paiid = 0;
            } else {
              // paiid = state - 1;
            }
            return openTips(res.msg);
          } else {
            setTimeout(() => {
              topId = 1;
            }, 2000);
            paiid = 1;
            code = 2;
          }
          let lostLis = res.data.lose;
          let win = res.data.win;
          if (idnum == 1 && state == 1) {
            // !说明是第一个游戏第一个关卡
            list1fu(lostLis, win);
            one1 = 1;
            setTimeout(() => {
              paiid = 1;
            }, 1500);
          } else if (idnum == 1 && state == 2) {
            one1 = 2;
            // !说明是第一个游戏第二个关卡
            list2fu(lostLis, win);
            setTimeout(() => {
              paiid = 2;
            }, 1500);
          } else if (idnum == 1 && state == 3) {
            list1fu(lostLis, win);
            one1 = 3;
            setTimeout(() => {
              paiid = 3;
            }, 1500);
          } else if (idnum == 1 && state == 4) {
            list2fu(lostLis, win);
            one1 = 4;
            setTimeout(() => {
              paiid = 4;
            }, 1500);
          } else if (idnum == 1 && state == 5) {
            list1fu(lostLis, win);
            one1 = 5;
            setTimeout(() => {
              paiid = 5;
            }, 1500);
          } else if (idnum == 1 && state == 6) {
            list2fu(lostLis, win);
            one1 = 6;
            setTimeout(() => {
              paiid = 6;
            }, 1500);
          } else if (idnum == 1 && state == 7) {
            list1fu(lostLis, win);
            one1 = 7;
            setTimeout(() => {
              paiid = 7;
            }, 1500);
          }
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
      // !三个的数据
      function list1fu(lostLis, win) {
        list1.push([
          {
            name: win.info.b_type ? win.info.name : "道具",
            img: win.info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + win.info.logo,
            num: win.num,
          },
          {
            name: lostLis[0].info.b_type ? win.info.name : "道具",
            img: lostLis[0].info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + lostLis[0].info.logo,
            num: lostLis[0].num,
          },
          {
            name: lostLis[1].info.b_type ? win.info.name : "道具",
            img: lostLis[1].info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + lostLis[1].info.logo,
            num: lostLis[1].num,
          },
        ]);
      }
      // !两个的数据
      function list2fu(lostLis, win) {
        list1.push([
          {
            name: win.info.b_type ? win.info.name : "道具",
            img: win.info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + win.info.logo,
            num: win.num,
          },
          {
            name: lostLis[0].info.b_type ? win.info.name : "道具",
            img: lostLis[0].info.logo
              ? IMG_DOMAIN + lostLis[0].info.logo
              : "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png",
            num: lostLis[0].num,
          },
        ]);
      }
    }
    function choujiang3() {
      let show3 = 2;
      //   !第三个翻拍--------------------------------------------------------------------------
      ele.cardthree3.onclick = (e) => {
        if (show3 == 1) {
          ele.cardthree3.onclick = null;
          return;
        }
        if (paiid != 2) {
          return;
        }
        if (e.target.dataset.num == 1) {
          show3 = 1;
          id = 1;
          state = 3;
          // todo调用翻拍接口
          let n = fanpai(1, 1);
          ele.img3_1.classList.add("img1");
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img3_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox3_1.innerHTML = `<p class="img_span">${list1[2][0].name}</p>
            <img class="jinbi_img" src="${list1[2][0].img}" alt="">
            <span>${list1[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            ele.img3_3.classList.add("img1");
            setTimeout(() => {
              if (code == 1) {
                return;
              }
              ele.img3_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_3.innerHTML = `<p class="img_span">${list1[2][2].name}</p>
              <img class="jinbi_img" src="${list1[2][2].img}" alt="">
              <span>${list1[2][2].num}</span>`;
            }, 500);
            ele.img3_2.classList.add("img1");
            setTimeout(() => {
              ele.img3_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_2.innerHTML = `<p class="img_span">${list1[2][1].name}</p>
												  <img class="jinbi_img" src="${list1[2][1].img}" alt="">
												  <span>${list1[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 2) {
          show3 = 1;
          id = 1;
          state = 3;
          // todo调用翻拍接口
          let n = fanpai(1, 2);
          ele.img3_2.classList.add("img1");
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img3_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox3_2.innerHTML = `<p class="img_span">${list1[2][0].name}</p>
                        <img class="jinbi_img" src="${list1[2][0].img}" alt="">
                        <span>${list1[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img3_3.classList.add("img1");

            setTimeout(() => {
              ele.img3_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_3.innerHTML = `<p class="img_span">${list1[2][2].name}</p>
												  <img class="jinbi_img" src="${list1[2][2].img}" alt="">
												  <span>${list1[2][2].num}</span>`;
            }, 500);
            ele.img3_1.classList.add("img1");
            setTimeout(() => {
              ele.img3_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_1.innerHTML = `<p class="img_span">${list1[2][1].name}</p>
												  <img class="jinbi_img" src="${list1[2][1].img}" alt="">
												  <span>${list1[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 3) {
          show3 = 1;
          id = 1;
          state = 3;
          // todo调用翻拍接口
          let n = fanpai(1, 3);
          ele.img3_3.classList.add("img1");
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img3_3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox3_3.innerHTML = `<p class="img_span">${list1[2][0].name}</p>
            <img class="jinbi_img" src="${list1[2][0].img}" alt="">
            <span>${list1[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img3_2.classList.add("img1");
            setTimeout(() => {
              ele.img3_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_2.innerHTML = `<p class="img_span">${list1[2][2].name}</p>
												  <img class="jinbi_img" src="${list1[2][2].img}" alt="">
												  <span>${list1[2][2].num}</span>`;
            }, 500);
            ele.img3_1.classList.add("img1");
            setTimeout(() => {
              ele.img3_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox3_1.innerHTML = `<p class="img_span">${list1[2][1].name}</p>
												  <img class="jinbi_img" src="${list1[2][1].img}" alt="">
												  <span>${list1[2][1].num}</span>`;
            }, 500);
          }, 2000);
        }
      };
    }
    function choujiang5() {
      //   !第五个翻拍--------------------------------------------------------------------------
      let show5 = 2;
      ele.cardthree5.onclick = (e) => {
        if (show5 == 1) {
          ele.cardthree5.onclick = null;
          return;
        }
        if (paiid != 4) {
          return;
        }
        if (e.target.dataset.num == 1) {
          show5 = 1;
          id = 1;
          state = 5;
          // todo调用翻拍接口
          let n = fanpai(1, 1);
          ele.img5_1.classList.add("img1");
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img5_1.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox5_1.innerHTML = `<p class="img_span">${list1[4][0].name}</p>
              <img class="jinbi_img" src="${list1[4][0].img}" alt="">
              <span>${list1[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img5_3.classList.add("img1");
            setTimeout(() => {
              ele.img5_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_3.innerHTML = `<p class="img_span">${list1[4][2].name}</p>
												  <img class="jinbi_img" src="${list1[4][2].img}" alt="">
												  <span>${list1[4][2].num}</span>`;
            }, 500);
            ele.img5_2.classList.add("img1");
            setTimeout(() => {
              ele.img5_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_2.innerHTML = `<p class="img_span">${list1[4][1].name}</p>
												  <img class="jinbi_img" src="${list1[4][1].img}" alt="">
												  <span>${list1[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 2) {
          show5 = 1;
          id = 1;
          state = 5;
          // todo调用翻拍接口
          let n = fanpai(1, 2);
          ele.img5_2.classList.add("img1");
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img5_2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox5_2.innerHTML = `<p class="img_span">${list1[4][0].name}</p>
              <img class="jinbi_img" src="${list1[4][0].img}" alt="">
              <span>${list1[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img5_3.classList.add("img1");
            setTimeout(() => {
              ele.img5_3.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_3.innerHTML = `<p class="img_span">${list1[4][2].name}</p>
												  <img class="jinbi_img" src="${list1[4][2].img}" alt="">
												  <span>${list1[4][2].num}</span>`;
            }, 500);
            ele.img5_1.classList.add("img1");
            setTimeout(() => {
              ele.img5_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_1.innerHTML = `<p class="img_span">${list1[4][1].name}</p>
												  <img class="jinbi_img" src="${list1[4][1].img}" alt="">
												  <span>${list1[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 3) {
          show5 = 1;
          id = 1;
          state = 5;
          // todo调用翻拍接口
          let n = fanpai(1, 3);
          ele.img5_3.classList.add("img1");
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img5_3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
            ele.img_titbox5_3.innerHTML = `<p class="img_span">${list1[4][0].name}</p>
              <img class="jinbi_img" src="${list1[4][0].img}" alt="">
              <span>${list1[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (n == 1) {
              return;
            }
            if (code == 1) {
              return;
            }
            ele.img5_2.classList.add("img1");
            setTimeout(() => {
              ele.img5_2.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_2.innerHTML = `<p class="img_span">${list1[4][2].name}</p>
												  <img class="jinbi_img" src="${list1[4][2].img}" alt="">
												  <span>${list1[4][2].num}</span>`;
            }, 500);
            ele.img5_1.classList.add("img1");
            setTimeout(() => {
              ele.img5_1.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/g1.png";
              ele.img_titbox5_1.innerHTML = `<p class="img_span">${list1[4][1].name}</p>
												  <img class="jinbi_img" src="${list1[4][1].img}" alt="">
												  <span>${list1[4][1].num}</span>`;
            }, 500);
          }, 2000);
        }
      };
    }
    //   !第7个页---------------------------------------
    function choujiang7() {
      //   !第一页点击宝箱
      ele.bao_top.onclick = () => {
        if (paiid != 6) {
          return;
        }
        id = 1;
        state = 7;
        let n = fanpai(1, 1);
        if (n == 1) return;
        // !是金币
        ele.bao_top2.onclick = null;
        ele.bao_top3.onclick = null;
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          if (
            list1[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao1.innerHTML = `
						<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1.innerHTML = `<img class="sonbox_img" src="${list1[6][0].img}" alt="">
																<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          if (list1[6][1].name == "金币") {
            ele.son_bao2.innerHTML = `
						<span class="num">x${list1[6][1].num}</span>`;
            ele.bao_top2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2.innerHTML = `<img class="sonbox_img" src="${list1[6][1].img}" alt="">
																<span class="num">x${list1[6][1].num}</span>`;
            ele.bao_top2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1[6][2].name == "金币") {
            ele.son_bao3.innerHTML = `
						<span class="num">x${list1[6][2].num}</span>`;
            ele.bao_top3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3.innerHTML = `<img class="sonbox_img" src="${list1[6][2].img}" alt="">
																<span class="num">x${list1[6][2].num}</span>`;
            ele.bao_top3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
      ele.bao_top2.onclick = () => {
        if (paiid != 6) {
          return;
        }
        id = 1;
        state = 7;
        let n = fanpai(1, 2);
        if (n == 1) return;
        // !是金币
        ele.bao_top.onclick = null;
        ele.bao_top3.onclick = null;
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          if (
            list1[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao2.innerHTML = `
						<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2.innerHTML = `<img class="sonbox_img" src="${list1[6][0].img}" alt="">
																<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code == 1) {
            return;
          }
          if (list1[6][1].name == "金币") {
            ele.son_bao3.innerHTML = `
						<span class="num">x${list1[6][1].num}</span>`;
            ele.bao_top3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3.innerHTML = `<img class="sonbox_img" src="${list1[6][1].img}" alt="">
																<span class="num">x${list1[6][1].num}</span>`;
            ele.bao_top3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1[6][2].name == "金币") {
            ele.son_bao1.innerHTML = `
						<span class="num">x${list1[6][2].num}</span>`;
            ele.bao_top.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1.innerHTML = `<img class="sonbox_img" src="${list1[6][2].img}" alt="">
																<span class="num">x${list1[6][2].num}</span>`;
            ele.bao_top.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
      ele.bao_top3.onclick = () => {
        if (paiid != 6) {
          return;
        }
        id = 1;
        state = 7;
        let n = fanpai(1, 3);
        if (n == 1) return;
        ele.bao_top.onclick = null;
        ele.bao_top2.onclick = null;
        // !是金币
        setTimeout(() => {
          if (
            list1[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao3.innerHTML = `
					<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3.innerHTML = `<img class="sonbox_img" src="${list1[6][0].img}" alt="">
															<span class="num">x${list1[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top3.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (list1[6][1].name == "金币") {
            ele.son_bao1.innerHTML = `
					<span class="num">x${list1[6][1].num}</span>`;
            ele.bao_top.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1.innerHTML = `<img class="sonbox_img" src="${list1[6][1].img}" alt="">
															<span class="num">x${list1[6][1].num}</span>`;
            ele.bao_top.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1[6][2].name == "金币") {
            ele.son_bao2.innerHTML = `
					<span class="num">x${list1[6][2].num}</span>`;
            ele.bao_top2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2.innerHTML = `<img class="sonbox_img" src="${list1[6][2].img}" alt="">
															<span class="num">x${list1[6][2].num}</span>`;
            ele.bao_top2.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
    }
  }
  // !  第二个

  function onePage2() {
    ele.chongxinL = $("#chongxinL");
    ele.chongkai1L = $("#chongkai1L");
    ele.img1_3L = $("#img1_3L");
    ele.img1_2L = $("#img1_2L");
    ele.img_titbox1_3L = $("#img_titbox1_3L");
    ele.img_titbox1_2L = $("#img_titbox1_2L");
    ele.img_titbox1_1L = $("#img_titbox1_1L");
    ele.img1_1L = $("#img1_1L");
    ele.img_titbox2_1L = $("#img_titbox2_1L");
    ele.img_titbox2_2L = $("#img_titbox2_2L");
    ele.cardboth1L = $("#cardboth1L");
    ele.img2_2L = $("#img2_2L");
    ele.img2_1L = $("#img2_1L");
    ele.img_titbox3_1L = $("#img_titbox3_1L");
    ele.img3_2L = $("#img3_2L");
    ele.img_titbox3_2L = $("#img_titbox3_2L");
    ele.img_titbox3_3L = $("#img_titbox3_3L");
    ele.img3_1L = $("#img3_1L");
    ele.img3_3L = $("#img3_3L");
    ele.cardboth4L = $("#cardboth4L");
    ele.img4_1L = $("#img4_1L");
    ele.img_titbox4_1L = $("#img_titbox4_1L");
    ele.img4_2L = $("#img4_2L");
    ele.img_titbox4_2L = $("#img_titbox4_2L");
    ele.cardthree3L = $("#cardthree3L");
    ele.img5_1L = $("#img5_1L");
    ele.cardthree5L = $("#cardthree5L");
    ele.img_titbox5_1L = $("#img_titbox5_1L");
    ele.img5_2L = $("#img5_2L");
    ele.img_titbox5_2L = $("#img_titbox5_2L");
    ele.img5_3L = $("#img5_3L");
    ele.img_titbox5_3L = $("#img_titbox5_3L");
    ele.cardboth6L = $("#cardboth6L");
    ele.img6_1L = $("#img6_1L");
    ele.img_titbox6_1L = $("#img_titbox6_1L");
    ele.img6_2L = $("#img6_2L");
    ele.img_titbox6_2L = $("#img_titbox6_2L");
    ele.bao_topL = $("#bao_topL");
    ele.bao_top3L = $("#bao_top3L");
    ele.bao_top2L = $("#bao_top2L");
    ele.son_bao1L = $("#son_bao1L");
    ele.son_bao2L = $("#son_bao2L");
    ele.son_bao3L = $("#son_bao3L");
    ele.option_primary = $("#option-primary");
    ele.option_middle = $("#option-middle");
    ele.option_senior = $("#option-senior");
    let list1L = [];
    //   第一个记录
    let jiluList1 = [];
    let stateL = 0;
    //   目前在那个等级游戏
    let idL = 2;
    let idtow = 2;
    let paiidL = 0;
    let code2 = 0;
    let toId2 = 0;
    let one2 = 0;
    let img1All = document.querySelectorAll(".img_1L");

    // !第二个点击重新开始？？？？？？？？？？？？？？？？？？？？？
    chongkai1L.onclick = () => {
      upDataL();
      setTimeout(() => {
        onePage2();
        list1L = [];
        toId2 = 0;
        idtow = 2;
        // !上面的宝箱
        ele.son_bao1L.innerHTML = " ";
        ele.son_bao2L.innerHTML = " ";
        ele.son_bao3L.innerHTML = " ";
        ele.bao_topL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        ele.bao_top2L.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        ele.bao_top3L.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        // 下面的绿点
        let n = document.querySelectorAll(".img_titboxL");
        n.forEach((item) => {
          item.innerHTML = " ";
        });
        img1All.forEach((item) => {
          // setTimeout(() => {
          item.classList.remove("img1");
          item.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/purple.png";
          // },900)
        });
      }, 2000);
    };

    // !翻牌记录!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    jilu();
    function jilu() {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.FANPAIJI,
        header: {
          Authorization: token,
        },
        data: {
          id: idL,
        },
        success: (res) => {
          if (res.data.list.length == 0) {
            return;
          }
          //   if (idL == 1) {
          paiidL = res.data.list.length;
          toId2 = res.data.list.length;
          jiluTree(res.data.list);
          //   渲染数据
          xuanranState();
          //   }
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
    }
    // !用来统计记录-----------
    function jiluTree(list) {
      let newList = [];
      list.forEach((item) => {
        if (item.info.lose.length == 2) {
          newList.push([
            {
              wz: item.wz,
              name: item.info.win.info.b_type
                ? item.info.win.info.name
                : "道具",
              img: item.info.win.info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.win.info.logo,
              num: item.info.win.num,
            },
            {
              name: item.info.lose[0].info.b_type
                ? item.info.lose[0].info.name
                : "道具",
              img: item.info.lose[0].info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.lose[0].info.logo,
              num: item.info.lose[0].num,
            },
            {
              name: item.info.lose[1].info.b_type ? win.info.name : "道具",
              img: item.info.lose[1].info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.lose[1].info.logo,
              num: item.info.lose[1].num,
            },
          ]);
        } else if (item.info.lose.length == 1) {
          newList.push([
            {
              wz: item.wz,
              name: item.info.win.info.b_type
                ? item.info.win.info.name
                : "道具",
              img: item.info.win.info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.win.info.logo,
              num: item.info.win.num,
            },
            {
              name: item.info.lose[0].info.b_type
                ? item.info.lose[0].info.name
                : "道具",
              img: item.info.lose[0].info.logo
                ? IMG_DOMAIN + item.info.lose[0].info.logo
                : "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png",
              num: item.info.lose[0].num,
            },
          ]);
        }
        list1L = newList;
        return newList;
      });
    }

    //   todo渲染记录----------------------------------------------------------
    function xuanranState() {
      try {
        if (list1L[0][0].wz == 1) {
          // todo调用翻拍接口
          ele.img1_1L.classList.add("img1");
          setTimeout(() => {
            ele.img1_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/P1.png";
            ele.img_titbox1_1L.innerHTML = `<p class="img_span">${list1L[0][0].name}</p>
												  <img class="jinbi_img" src="${list1L[0][0].img}" alt="">
												  <span>${list1L[0][0].num}</span>
                             <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img1_3L.classList.add("img1");
            setTimeout(() => {
              ele.img1_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox1_3L.innerHTML = `<p class="img_span">${list1L[0][2].name}</p>
												  <img class="jinbi_img" src="${list1L[0][2].img}" alt="">
												  <span>${list1L[0][2].num}</span>`;
            }, 500);
            ele.img1_2L.classList.add("img1");
            setTimeout(() => {
              ele.img1_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox1_2L.innerHTML = `<p class="img_span">${list1L[0][1].name}</p>
												  <img class="jinbi_img" src="${list1L[0][1].img}" alt="">
												  <span>${list1L[0][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1L[0][0].wz == 2) {
          ele.img1_2L.classList.add("img1");
          setTimeout(() => {
            ele.img1_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox1_2L.innerHTML = `<p class="img_span">${list1L[0][0].name}</p>
													  <img class="jinbi_img" src="${list1L[0][0].img}" alt="">
													  <span>${list1L[0][0].num}</span>
                             <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                            `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            idL = 1;
            ele.img1_1L.classList.add("img1");
            setTimeout(() => {
              ele.img1_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox1_1L.innerHTML = `<p class="img_span">${list1L[0][1].name}</p>
												  <img class="jinbi_img" src="${list1L[0][1].img}" alt="">
												  <span>${list1L[0][1].num}</span>`;
            }, 500);
            ele.img1_3L.classList.add("img1");
            setTimeout(() => {
              ele.img1_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox1_3L.innerHTML = `<p class="img_span">${list1L[0][2].name}</p>
												  <img class="jinbi_img" src="${list1L[0][2].img}" alt="">
												  <span>${list1L[0][2].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1L[0][0].wz == 3) {
          ele.img1_3L.classList.add("img1");
          setTimeout(() => {
            ele.img1_3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img1_3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox1_3L.innerHTML = `<p class="img_span">${list1L[0][0].name}</p>
												  <img class="jinbi_img" src="${list1L[0][0].img}" alt="">
												  <span>${list1L[0][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img1_1L.classList.add("img1");
            setTimeout(() => {
              ele.img1_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox1_1L.innerHTML = `<p class="img_span">${list1L[0][2].name}</p>
												  <img class="jinbi_img" src="${list1L[0][2].img}" alt="">
												  <span>${list1L[0][2].num}</span>`;
            }, 500);
            ele.img1_2L.classList.add("img1");
            setTimeout(() => {
              ele.img1_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox1_2L.innerHTML = `<p class="img_span">${list1L[0][1].name}</p>
													  <img class="jinbi_img" src="${list1L[0][1].img}" alt="">
													  <span>${list1L[0][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        if (list1L[1][0].wz == 1) {
          ele.img2_1L.classList.add("img1");
          setTimeout(() => {
            ele.img2_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox2_1L.innerHTML = `<p class="img_span">${list1L[1][0].name}</p>
												  <img class="jinbi_img" src="${list1L[1][0].img}" alt="">
												  <span>${list1L[1][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img2_2L.classList.add("img1");
            setTimeout(() => {
              ele.img2_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox2_2L.innerHTML = `<p class="img_span">${list1L[1][1].name}</p>
												  <img class="jinbi_img" src="${list1L[1][1].img}" alt="">
												  <span>${list1L[1][1].num}</span>`;
            }, 500);
            ele.img2_2L.classList.add("img1");
          }, 2000);
        } else if (list1L[1][0].wz == 2) {
          ele.img2_2L.classList.add("img1");
          setTimeout(() => {
            ele.img2_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox2_2L.innerHTML = `<p class="img_span">${list1L[1][0].name}</p>
												  <img class="jinbi_img" src="${list1L[1][0].img}" alt="">
												  <span>${list1L[1][0].num}</span>  <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img2_1L.classList.add("img1");
            setTimeout(() => {
              ele.img2_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox2_1L.innerHTML = `<p class="img_span">${list1L[1][1].name}</p>
												  <img class="jinbi_img" src="${list1L[1][1].img}" alt="">
												  <span>${list1L[1][1].num}</span>`;
            }, 500);
            ele.img2_1L.classList.add("img1");
          }, 2000);
        }
        if (list1L[2][0].wz == 1) {
          ele.img3_1L.classList.add("img1");
          setTimeout(() => {
            ele.img3_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox3_1L.innerHTML = `<p class="img_span">${list1L[2][0].name}</p>
												  <img class="jinbi_img" src="${list1L[2][0].img}" alt="">
												  <span>${list1L[2][0].num}</span>  <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img3_3L.classList.add("img1");
            setTimeout(() => {
              ele.img3_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_3L.innerHTML = `<p class="img_span">${list1L[2][2].name}</p>
												  <img class="jinbi_img" src="${list1L[2][2].img}" alt="">
												  <span>${list1L[2][2].num}</span>`;
            }, 500);
            ele.img3_2L.classList.add("img1");
            setTimeout(() => {
              ele.img3_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_2L.innerHTML = `<p class="img_span">${list1L[2][1].name}</p>
												  <img class="jinbi_img" src="${list1L[2][1].img}" alt="">
												  <span>${list1L[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1L[0][0].wz == 2) {
          ele.img3_2L.classList.add("img1");
          setTimeout(() => {
            ele.img3_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox3_2L.innerHTML = `<p class="img_span">${list1L[2][0].name}</p>
												  <img class="jinbi_img" src="${list1L[2][0].img}" alt="">
												  <span>${list1L[2][0].num}</span>  <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img3_3L.classList.add("img1");
            setTimeout(() => {
              ele.img3_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_3L.innerHTML = `<p class="img_span">${list1L[2][2].name}</p>
												  <img class="jinbi_img" src="${list1L[2][2].img}" alt="">
												  <span>${list1L[2][2].num}</span>`;
            }, 500);
            ele.img3_1L.classList.add("img1");
            setTimeout(() => {
              ele.img3_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_1L.innerHTML = `<p class="img_span">${list1L[2][1].name}</p>
												  <img class="jinbi_img" src="${list1L[2][1].img}" alt="">
												  <span>${list1L[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1L[0][0].wz == 3) {
          ele.img3_3L.classList.add("img1");
          setTimeout(() => {
            ele.img3_3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox3_3L.innerHTML = `<p class="img_span">${list1L[2][0].name}</p>
												  <img class="jinbi_img" src="${list1L[2][0].img}" alt="">
												  <span>${list1L[2][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img3_2L.classList.add("img1");
            setTimeout(() => {
              ele.img3_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_2L.innerHTML = `<p class="img_span">${list1L[2][2].name}</p>
												  <img class="jinbi_img" src="${list1L[2][2].img}" alt="">
												  <span>${list1L[2][2].num}</span>`;
            }, 500);
            ele.img3_1L.classList.add("img1");
            setTimeout(() => {
              ele.img3_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_1L.innerHTML = `<p class="img_span">${list1L[2][1].name}</p>
												  <img class="jinbi_img" src="${list1L[2][1].img}" alt="">
												  <span>${list1L[2][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        // 第四个
        if (list1L[3][0].wz == 1) {
          // 第四个
          // todo调用翻拍接口
          ele.img4_1L.classList.add("img1");
          setTimeout(() => {
            ele.img4_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox4_1L.innerHTML = `<p class="img_span">${list1L[3][0].name}</p>
													<img class="jinbi_img" src="${list1L[3][0].img}" alt="">
													<span>${list1L[3][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img4_2L.classList.add("img1");
            setTimeout(() => {
              ele.img4_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox4_2L.innerHTML = `<p class="img_span">${list1L[3][1].name}</p>
													<img class="jinbi_img" src="${list1L[3][1].img}" alt="">
													<span>${list1L[3][1].num}</span>`;
            }, 500);
            ele.img4_2L.classList.add("img1");
          }, 2000);
        } else if (list1L[3][0].wz == 2) {
          ele.img4_2L.classList.add("img1");
          setTimeout(() => {
            ele.img4_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox4_2L.innerHTML = `<p class="img_span">${list1L[3][0].name}</p>
													<img class="jinbi_img" src="${list1L[3][0].img}" alt="">
													<span>${list1L[3][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img4_1L.classList.add("img1");
            setTimeout(() => {
              ele.img4_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox4_1L.innerHTML = `<p class="img_span">${list1L[3][1].name}</p>
													<img class="jinbi_img" src="${list1L[3][1].img}" alt="">
													<span>${list1L[3][1].num}</span>`;
            }, 500);
            ele.img4_1L.classList.add("img1");
          }, 2000);
        }
        // 第五个
        if (list1L[4][0].wz == 1) {
          ele.img5_1L.classList.add("img1");
          setTimeout(() => {
            ele.img5_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox5_1L.innerHTML = `<p class="img_span">${list1L[4][0].name}</p>
												  <img class="jinbi_img" src="${list1L[4][0].img}" alt="">
												  <span>${list1L[4][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img5_3L.classList.add("img1");
            setTimeout(() => {
              ele.img5_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_3L.innerHTML = `<p class="img_span">${list1L[4][2].name}</p>
												  <img class="jinbi_img" src="${list1L[4][2].img}" alt="">
												  <span>${list1L[4][2].num}</span>`;
            }, 500);
            ele.img5_2L.classList.add("img1");
            setTimeout(() => {
              ele.img5_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_2L.innerHTML = `<p class="img_span">${list1L[4][1].name}</p>
												  <img class="jinbi_img" src="${list1L[4][1].img}" alt="">
												  <span>${list1L[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1L[4][0].wz == 2) {
          ele.img5_2L.classList.add("img1");
          setTimeout(() => {
            ele.img5_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox5_2L.innerHTML = `<p class="img_span">${list1L[4][0].name}</p>
												  <img class="jinbi_img" src="${list1L[4][0].img}" alt="">
												  <span>${list1L[4][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_3L.classList.add("img1");
            setTimeout(() => {
              ele.img5_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_3L.innerHTML = `<p class="img_span">${list1L[4][2].name}</p>
												  <img class="jinbi_img" src="${list1L[4][2].img}" alt="">
												  <span>${list1L[4][2].num}</span>`;
            }, 500);
            ele.img5_1L.classList.add("img1");
            setTimeout(() => {
              ele.img5_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_1L.innerHTML = `<p class="img_span">${list1L[4][1].name}</p>
												  <img class="jinbi_img" src="${list1L[4][1].img}" alt="">
												  <span>${list1L[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1L[4][0].wz == 3) {
          ele.img5_3L.classList.add("img1");
          setTimeout(() => {
            ele.img5_3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox5_3L.innerHTML = `<p class="img_span">${list1L[4][0].name}</p>
												  <img class="jinbi_img" src="${list1L[4][0].img}" alt="">
												  <span>${list1L[4][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_2L.classList.add("img1");
            setTimeout(() => {
              ele.img5_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_2L.innerHTML = `<p class="img_span">${list1L[4][2].name}</p>
												  <img class="jinbi_img" src="${list1L[4][2].img}" alt="">
												  <span>${list1L[4][2].num}</span>`;
            }, 500);
            ele.img5_1L.classList.add("img1");
            setTimeout(() => {
              ele.img5_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_1L.innerHTML = `<p class="img_span">${list1L[4][1].name}</p>
												  <img class="jinbi_img" src="${list1L[4][1].img}" alt="">
												  <span>${list1L[4][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        //   第六个
        if (list1L[5][0].wz == 1) {
          ele.img6_1L.classList.add("img1");
          setTimeout(() => {
            ele.img6_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox6_1L.innerHTML = `<p class="img_span">${list1L[5][0].name}</p>
													<img class="jinbi_img" src="${list1L[5][0].img}" alt="">
													<span>${list1L[5][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img6_2L.classList.add("img1");
            setTimeout(() => {
              ele.img6_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox6_2L.innerHTML = `<p class="img_span">${list1L[5][1].name}</p>
													<img class="jinbi_img" src="${list1L[5][1].img}" alt="">
													<span>${list1L[5][1].num}</span>`;
            }, 500);
            ele.img6_2L.classList.add("img1");
          }, 2000);
        } else if (list1L[5][0].wz == 2) {
          ele.img6_2L.classList.add("img1");
          setTimeout(() => {
            ele.img6_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox6_2L.innerHTML = `<p class="img_span">${list1L[5][0].name}</p>
													<img class="jinbi_img" src="${list1L[5][0].img}" alt="">
													<span>${list1L[5][0].num}</span>
                            <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img6_1L.classList.add("img1");
            setTimeout(() => {
              ele.img6_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox6_1L.innerHTML = `<p class="img_span">${list1L[5][1].name}</p>
													<img class="jinbi_img" src="${list1L[5][0].img}" alt="">
													<span>${list1L[5][1].num}</span>`;
            }, 500);
            ele.img6_1L.classList.add("img1");
          }, 2000);
        }
        // 第七个
        if (list1L[6][0].wz == 1) {
          setTimeout(() => {
            if (
              list1L[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao1L.innerHTML = `
						<span class="num">x${list1L[6][0].num}</span>
            <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
            `;
              ele.bao_topL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1L.innerHTML = `<img class="sonbox_img" src="${list1L[6][0].img}" alt="">
																<span class="num">x${list1L[6][0].num}</span>
                                  <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                                `;
              ele.bao_topL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1L[6][1].name == "金币") {
              ele.son_bao2L.innerHTML = `
						<span class="num">x${list1L[6][1].num}</span>`;
              ele.bao_top2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2L.innerHTML = `<img class="sonbox_img" src="${list1L[6][1].img}" alt="">
																<span class="num">x${list1L[6][1].num}</span>`;
              ele.bao_top2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1L[6][2].name == "金币") {
              ele.son_bao3L.innerHTML = `
						<span class="num">x${list1L[6][2].num}</span>`;
              ele.bao_top3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3L.innerHTML = `<img class="sonbox_img" src="${list1L[6][2].img}" alt="">
																<span class="num">x${list1L[6][2].num}</span>`;
              ele.bao_top3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        } else if (list1L[6][0].wz == 2) {
          setTimeout(() => {
            if (
              list1L[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao2L.innerHTML = `
						<span class="num">x${list1L[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2L.innerHTML = `<img class="sonbox_img" src="${list1L[6][0].img}" alt="">
																<span class="num">x${list1L[6][0].num}</span>
                                  <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                                `;
              ele.bao_top2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1L[6][1].name == "金币") {
              ele.son_bao3L.innerHTML = `
						<span class="num">x${list1L[6][1].num}</span>`;
              ele.bao_top3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3L.innerHTML = `<img class="sonbox_img" src="${list1L[6][1].img}" alt="">
																<span class="num">x${list1L[6][1].num}</span>`;
              ele.bao_top3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1L[6][2].name == "金币") {
              ele.son_bao1L.innerHTML = `
						<span class="num">x${list1L[6][2].num}</span>`;
              ele.bao_topL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1L.innerHTML = `<img class="sonbox_img" src="${list1L[6][2].img}" alt="">
																<span class="num">x${list1L[6][2].num}</span>`;
              ele.bao_topL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        } else if (list1L[6][0].wz == 3) {
          // !是金币
          setTimeout(() => {
            if (
              list1L[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao3L.innerHTML = `
					<span class="num">x${list1L[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3L.innerHTML = `<img class="sonbox_img" src="${list1L[6][0].img}" alt="">
															<span class="num">x${list1L[6][0].num}</span>
                                <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                              `;
              ele.bao_top3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1L[6][1].name == "金币") {
              ele.son_bao1L.innerHTML = `
					<span class="num">x${list1L[6][1].num}</span>`;
              ele.bao_topL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1L.innerHTML = `<img class="sonbox_img" src="${list1L[6][1].img}" alt="">
															<span class="num">x${list1L[6][1].num}</span>`;
              ele.bao_topL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1L[6][2].name == "金币") {
              ele.son_bao2L.innerHTML = `
					<span class="num">x${list1L[6][2].num}</span>`;
              ele.bao_top2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2L.innerHTML = `<img class="sonbox_img" src="${list1L[6][2].img}" alt="">
															<span class="num">x${list1L[6][2].num}</span>`;
              ele.bao_top2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        }
      } catch (error) {}
    }
    // ! 重新开始
    function upDataL() {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.CHONGXINKAISHI,
        header: {
          Authorization: token,
        },
        data: {
          lv: idtow,
        },
        success: (res) => {
          list1L = [];
          toId2 = 0;
          idtow = 2;
          openTips(res.msg);
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
    }
    //   !第一页第一个--------------------------------------------------------------------

    ele.img1_1L.onclick = () => {
      idL = 1;
      stateL = 1;
      // todo调用翻拍接口
      fanpai(1, 1, 1);

      ele.img1_1L.classList.add("img1");
      ele.img1_3L.onclick = null;
      ele.img1_2L.onclick = null;
      setTimeout(() => {
        if (paiidL == 0) {
          return;
        }
        ele.img1_1L.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
        ele.img_titbox1_1L.innerHTML = `<p class="img_span">${list1L[0][0].name}</p>
		  
												  <img class="jinbi_img" src="${list1L[0][0].img}" alt="">
												  <span>${list1L[0][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        openTips(`恭喜获得${list1L[0][0].name}x${list1L[0][0].num}`);
      }, 500);
      // todo打开其他两个
      setTimeout(() => {
        if (paiidL == 0) {
          return;
        }
        ele.img1_3L.classList.add("img1");
        setTimeout(() => {
          ele.img1_3L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox1_3L.innerHTML = `<p class="img_span">${list1L[0][2].name}</p>
												  <img class="jinbi_img" src="${list1L[0][2].img}" alt="">
												  <span>${list1L[0][2].num}</span>`;
        }, 500);
        ele.img1_2L.classList.add("img1");
        setTimeout(() => {
          ele.img1_2L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox1_2L.innerHTML = `<p class="img_span">${list1L[0][1].name}</p>
												  <img class="jinbi_img" src="${list1L[0][1].img}" alt="">
												  <span>${list1L[0][1].num}</span>`;
        }, 500);
      }, 2000);
    };
    //   !第一页第二个
    ele.img1_2L.onclick = () => {
      idL = 1;
      stateL = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 2);
      if (n == 1) {
        return;
      }
      ele.img1_3L.onclick = null;
      ele.img1_1L.onclick = null;
      ele.img1_2L.classList.add("img1");
      setTimeout(() => {
        if (paiidL == 0) {
          return;
        }
        if (code2 == 1) {
          return;
        }
        ele.img1_2L.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
        ele.img_titbox1_2L.innerHTML = `<p class="img_span">${list1L[0][0].name}</p>
													  <img class="jinbi_img" src="${list1L[0][0].img}" alt="">
													  <span>${list1L[0][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
      }, 500);
      // todo打开其他两个
      setTimeout(() => {
        if (paiidL == 0) {
          return;
        }
        if (code2 == 1) {
          return;
        }
        idL = 1;
        ele.img1_1L.classList.add("img1");
        setTimeout(() => {
          ele.img1_1L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox1_1L.innerHTML = `<p class="img_span">${list1L[0][1].name}</p>
												  <img class="jinbi_img" src="${list1L[0][1].img}" alt="">
												  <span>${list1L[0][1].num}</span>`;
        }, 500);
        ele.img1_3L.classList.add("img1");
        setTimeout(() => {
          ele.img1_3L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox1_3L.innerHTML = `<p class="img_span">${list1L[0][2].name}</p>
												  <img class="jinbi_img" src="${list1L[0][2].img}" alt="">
												  <span>${list1L[0][2].num}</span>`;
        }, 500);
      }, 2000);
    };
    //   !第一页第三个
    ele.img1_3L.onclick = () => {
      idL = 1;
      stateL = 1;
      // todo调用翻拍接口
      fanpai(1, 3);
      ele.img1_1L.onclick = null;
      ele.img1_2L.onclick = null;
      ele.img1_3L.classList.add("img1");
      setTimeout(() => {
        if (paiidL == 0) {
          return;
        }
        if (code2 == 1) {
          return;
        }
        ele.img1_3L.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
        ele.img1_3L.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
        ele.img_titbox1_3L.innerHTML = `<p class="img_span">${list1L[0][0].name}</p>
												  <img class="jinbi_img" src="${list1L[0][0].img}" alt="">
												  <span>${list1L[0][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
      }, 1000);
      // todo打开其他两个
      setTimeout(() => {
        if (paiidL == 0) {
          return;
        }
        if (code2 == 1) {
          return;
        }
        ele.img1_1L.classList.add("img1");
        setTimeout(() => {
          ele.img1_1L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox1_1L.innerHTML = `<p class="img_span">${list1L[0][2].name}</p>
												  <img class="jinbi_img" src="${list1L[0][2].img}" alt="">
												  <span>${list1L[0][2].num}</span>`;
        }, 500);
        ele.img1_2L.classList.add("img1");
        setTimeout(() => {
          ele.img1_2L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox1_2L.innerHTML = `<p class="img_span">${list1L[0][1].name}</p>
													  <img class="jinbi_img" src="${list1L[0][1].img}" alt="">
													  <span>${list1L[0][1].num}</span>`;
        }, 500);
      }, 2000);
    };
    let showw2 = 2;
    //   !第二个翻拍------------------------------------------------------------------
    ele.cardboth1L.onclick = (e) => {
      if (toId2 == 0) return;
      if (showw2 == 1) {
        ele.cardboth1L.onclick = null;
        return;
      }
      if (paiidL != 1) {
        return;
      }
      if (e.target.dataset.num == 1) {
        showw2 = 1;

        idL = 1;
        stateL = 2;
        // todo调用翻拍接口
        fanpai(1, 1);
        ele.img2_1L.classList.add("img1");
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img2_1L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox2_1L.innerHTML = `<p class="img_span">${list1L[1][0].name}</p>
												  <img class="jinbi_img" src="${list1L[1][0].img}" alt="">
												  <span>${list1L[1][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img2_2L.classList.add("img1");
          setTimeout(() => {
            ele.img2_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox2_2L.innerHTML = `<p class="img_span">${list1L[1][1].name}</p>
												  <img class="jinbi_img" src="${list1L[1][1].img}" alt="">
												  <span>${list1L[1][1].num}</span>`;
          }, 500);
          ele.img2_2L.classList.add("img1");
        }, 2000);
        return;
      } else {
        showw2 = 1;
        if (toId2 == 0) return;
        idL = 1;
        stateL = 2;
        // todo调用翻拍接口
        fanpai(1, 2);
        ele.img2_2L.classList.add("img1");
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img2_2L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox2_2L.innerHTML = `<p class="img_span">${list1L[1][0].name}</p>
												  <img class="jinbi_img" src="${list1L[1][0].img}" alt="">
												  <span>${list1L[1][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img2_1L.classList.add("img1");
          setTimeout(() => {
            ele.img2_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox2_1L.innerHTML = `<p class="img_span">${list1L[1][1].name}</p>
												  <img class="jinbi_img" src="${list1L[1][1].img}" alt="">
												  <span>${list1L[1][1].num}</span>`;
          }, 500);
          ele.img2_1L.classList.add("img1");
        }, 2000);
        return;
      }
    };
    let showw4 = 2;
    //   !第四个翻拍------------------------------------------------------------------
    ele.cardboth4L.onclick = (e) => {
      if (showw4 == 1) {
        ele.cardboth4L.onclick = null;
        return;
      }
      if (paiidL != 3) {
        return;
      }
      if (e.target.dataset.num == 1) {
        showw4 = 1;
        idL = 1;
        stateL = 4;
        // todo调用翻拍接口
        fanpai(1, 1);
        ele.img4_1L.classList.add("img1");
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img4_1L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox4_1L.innerHTML = `<p class="img_span">${list1L[3][0].name}</p>
													<img class="jinbi_img" src="${list1L[3][0].img}" alt="">
													<span>${list1L[3][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img4_2L.classList.add("img1");
          setTimeout(() => {
            ele.img4_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox4_2L.innerHTML = `<p class="img_span">${list1L[3][1].name}</p>
													<img class="jinbi_img" src="${list1L[3][1].img}" alt="">
													<span>${list1L[3][1].num}</span>`;
          }, 500);
          ele.img4_2L.classList.add("img1");
        }, 2000);
        return;
      } else {
        showw4 = 1;
        idL = 1;
        stateL = 4;
        // todo调用翻拍接口
        fanpai(1, 2);
        ele.img4_2L.classList.add("img1");
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img4_2L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox4_2L.innerHTML = `<p class="img_span">${list1L[3][0].name}</p>
													<img class="jinbi_img" src="${list1L[3][0].img}" alt="">
													<span>${list1L[3][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img4_1L.classList.add("img1");
          setTimeout(() => {
            ele.img4_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox4_1L.innerHTML = `<p class="img_span">${list1L[3][1].name}</p>
													<img class="jinbi_img" src="${list1L[3][1].img}" alt="">
													<span>${list1L[3][1].num}</span>`;
          }, 500);
          ele.img4_1L.classList.add("img1");
        }, 2000);
        return;
      }
    };
    let showw6 = 2;
    //   !第六个翻拍------------------------------------------------------------------
    ele.cardboth6L.onclick = (e) => {
      // if (showw4 == 1) {
      //   ele.cardboth6L.onclick = null;
      //   return;
      // }
      if (paiidL != 5) {
        return;
      }
      if (e.target.dataset.num == 1) {
        showw6 = 1;
        idL = 1;
        stateL = 6;
        // todo调用翻拍接口
        fanpai(1, 1);
        ele.img6_1L.classList.add("img1");
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img6_1L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox6_1L.innerHTML = `<p class="img_span">${list1L[5][0].name}</p>
													<img class="jinbi_img" src="${list1L[5][0].img}" alt="">
													<span>${list1L[5][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img6_2L.classList.add("img1");
          setTimeout(() => {
            ele.img6_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox6_2L.innerHTML = `<p class="img_span">${list1L[5][1].name}</p>
													<img class="jinbi_img" src="${list1L[5][1].img}" alt="">
													<span>${list1L[5][1].num}</span>`;
          }, 500);
          ele.img6_2L.classList.add("img1");
        }, 2000);
        return;
      } else {
        showw6 = 1;
        idL = 1;
        stateL = 6;
        // todo调用翻拍接口
        fanpai(1, 2);
        ele.img6_2L.classList.add("img1");
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          ele.img6_2L.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
          ele.img_titbox6_2L.innerHTML = `<p class="img_span">${list1L[5][0].name}</p>
													<img class="jinbi_img" src="${list1L[5][0].img}" alt="">
													<span>${list1L[5][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 900);
        // todo打开其他两个
        setTimeout(() => {
          ele.img6_1L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img6_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox6_1L.innerHTML = `<p class="img_span">${list1L[5][1].name}</p>
													<img class="jinbi_img" src="${list1L[5][0].img}" alt="">
													<span>${list1L[5][1].num}</span>`;
          }, 500);
          ele.img6_1L.classList.add("img1");
        }, 2000);
        return;
      }
    };
    //! 第三个翻牌----------------------------------------------------------------
    choujiang3();
    //! 第五个翻牌----------------------------------------------------------------
    choujiang5();
    //   !第七个---------------------------------------------------------------=----
    choujiang7();
    function fanpai(idnum, weizhi) {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.FANPAIJILU,
        header: {
          Authorization: token,
        },
        data: {
          lv: idtow,
          cen: stateL,
          wz: weizhi,
        },
        success: (res) => {
          if (res.code == 1) {
            openTips(`恭喜获得${res.data.win.info.name}x${res.data.win.num}`);
          }
          if (res.msg == "能量不足！") {
            code2 = 1;
            openTips(res.msg);
            return 1;
          }
          if (res.code == 0) {
            // paiidL = 0;
            return openTips(res.msg);
          } else {
            setTimeout(() => {
              toId2 = 1;
            }, 2000);
            code2 = 2;
            paiidL = 1;
          }
          let lostLis = res.data.lose;
          let win = res.data.win;
          if (idnum == 1 && stateL == 1) {
            // !说明是第一个游戏第一个关卡
            list1fu(lostLis, win);
            one2 = 1;
            setTimeout(() => {
              paiidL = 1;
            }, 1000);
          } else if (idnum == 1 && stateL == 2) {
            // !说明是第一个游戏第二个关卡
            list2fu(lostLis, win);
            one2 = 2;
            setTimeout(() => {
              paiidL = 2;
            }, 1500);
          } else if (idnum == 1 && stateL == 3) {
            list1fu(lostLis, win);
            one2 = 3;
            setTimeout(() => {
              paiidL = 3;
            }, 1500);
          } else if (idnum == 1 && stateL == 4) {
            list2fu(lostLis, win);
            one2 = 4;
            setTimeout(() => {
              paiidL = 4;
            }, 1500);
          } else if (idnum == 1 && stateL == 5) {
            list1fu(lostLis, win);
            one2 = 5;
            setTimeout(() => {
              paiidL = 5;
            }, 1500);
          } else if (idnum == 1 && stateL == 6) {
            list2fu(lostLis, win);
            one2 = 6;
            setTimeout(() => {
              paiidL = 6;
            }, 1500);
          } else if (idnum == 1 && stateL == 7) {
            list1fu(lostLis, win);
            one2 = 7;
            setTimeout(() => {
              paiidL = 7;
            }, 1500);
          }
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
      // !三个的数据
      function list1fu(lostLis, win) {
        list1L.push([
          {
            name: win.info.b_type ? win.info.name : "道具",
            img: win.info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + win.info.logo,
            num: win.num,
          },
          {
            name: lostLis[0].info.b_type ? win.info.name : "道具",
            img: lostLis[0].info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + lostLis[0].info.logo,
            num: lostLis[0].num,
          },
          {
            name: lostLis[1].info.b_type ? win.info.name : "道具",
            img: lostLis[1].info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + lostLis[1].info.logo,
            num: lostLis[1].num,
          },
        ]);
      }
      // !两个的数据
      function list2fu(lostLis, win) {
        list1L.push([
          {
            name: win.info.b_type ? win.info.name : "道具",
            img: win.info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + win.info.logo,
            num: win.num,
          },
          {
            name: lostLis[0].info.b_type ? win.info.name : "道具",
            img: lostLis[0].info.logo
              ? IMG_DOMAIN + lostLis[0].info.logo
              : "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png",
            num: lostLis[0].num,
          },
        ]);
      }
    }

    function choujiang3() {
      let showw3 = 2;
      //   !第三个翻拍--------------------------------------------------------------------------
      ele.cardthree3L.onclick = (e) => {
        if (showw3 == 1) {
          ele.cardthree3L.onclick = null;
          return;
        }
        if (paiidL != 2) {
          return;
        }
        if (e.target.dataset.num == 1) {
          showw3 = 1;
          idL = 1;
          stateL = 3;
          // todo调用翻拍接口
          fanpai(1, 1);
          ele.img3_1L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img3_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox3_1L.innerHTML = `<p class="img_span">${list1L[2][0].name}</p>
												  <img class="jinbi_img" src="${list1L[2][0].img}" alt="">
												  <span>${list1L[2][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img3_3L.classList.add("img1");
            setTimeout(() => {
              ele.img3_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_3L.innerHTML = `<p class="img_span">${list1L[2][2].name}</p>
												  <img class="jinbi_img" src="${list1L[2][2].img}" alt="">
												  <span>${list1L[2][2].num}</span>`;
            }, 500);
            ele.img3_2L.classList.add("img1");
            setTimeout(() => {
              ele.img3_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_2L.innerHTML = `<p class="img_span">${list1L[2][1].name}</p>
												  <img class="jinbi_img" src="${list1L[2][1].img}" alt="">
												  <span>${list1L[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 2) {
          showw3 = 1;
          idL = 1;
          stateL = 3;
          // todo调用翻拍接口
          fanpai(1, 2);
          ele.img3_2L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img3_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox3_2L.innerHTML = `<p class="img_span">${list1L[2][0].name}</p>
												  <img class="jinbi_img" src="${list1L[2][0].img}" alt="">
												  <span>${list1L[2][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img3_3L.classList.add("img1");
            setTimeout(() => {
              ele.img3_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_3L.innerHTML = `<p class="img_span">${list1L[2][2].name}</p>
												  <img class="jinbi_img" src="${list1L[2][2].img}" alt="">
												  <span>${list1L[2][2].num}</span>`;
            }, 500);
            ele.img3_1L.classList.add("img1");
            setTimeout(() => {
              ele.img3_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_1L.innerHTML = `<p class="img_span">${list1L[2][1].name}</p>
												  <img class="jinbi_img" src="${list1L[2][1].img}" alt="">
												  <span>${list1L[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 3) {
          showw3 = 1;
          idL = 1;
          stateL = 3;
          // todo调用翻拍接口
          fanpai(1, 3);
          ele.img3_3L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img3_3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox3_3L.innerHTML = `<p class="img_span">${list1L[2][0].name}</p>
												  <img class="jinbi_img" src="${list1L[2][0].img}" alt="">
												  <span>${list1L[2][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img3_2L.classList.add("img1");
            setTimeout(() => {
              ele.img3_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_2L.innerHTML = `<p class="img_span">${list1L[2][2].name}</p>
												  <img class="jinbi_img" src="${list1L[2][2].img}" alt="">
												  <span>${list1L[2][2].num}</span>`;
            }, 500);
            ele.img3_1L.classList.add("img1");
            setTimeout(() => {
              ele.img3_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox3_1L.innerHTML = `<p class="img_span">${list1L[2][1].name}</p>
												  <img class="jinbi_img" src="${list1L[2][1].img}" alt="">
												  <span>${list1L[2][1].num}</span>`;
            }, 500);
          }, 2000);
        }
      };
    }
    function choujiang5() {
      let showw5 = 2;
      //   !第五个翻拍--------------------------------------------------------------------------
      ele.cardthree5L.onclick = (e) => {
        if (showw5 == 1) {
          ele.cardthree5L.onclick = null;
          return;
        }
        if (paiidL != 4) {
          return;
        }
        if (e.target.dataset.num == 1) {
          showw5 = 1;
          idL = 1;
          stateL = 5;
          // todo调用翻拍接口
          fanpai(1, 1);
          ele.img5_1L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img5_1L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox5_1L.innerHTML = `<p class="img_span">${list1L[4][0].name}</p>
												  <img class="jinbi_img" src="${list1L[4][0].img}" alt="">
												  <span>${list1L[4][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img5_3L.classList.add("img1");
            setTimeout(() => {
              ele.img5_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_3L.innerHTML = `<p class="img_span">${list1L[4][2].name}</p>
												  <img class="jinbi_img" src="${list1L[4][2].img}" alt="">
												  <span>${list1L[4][2].num}</span>`;
            }, 500);
            ele.img5_2L.classList.add("img1");
            setTimeout(() => {
              ele.img5_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_2L.innerHTML = `<p class="img_span">${list1L[4][1].name}</p>
												  <img class="jinbi_img" src="${list1L[4][1].img}" alt="">
												  <span>${list1L[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 2) {
          showw5 = 1;
          idL = 1;
          stateL = 5;
          // todo调用翻拍接口
          fanpai(1, 2);
          ele.img5_2L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img5_2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox5_2L.innerHTML = `<p class="img_span">${list1L[4][0].name}</p>
												  <img class="jinbi_img" src="${list1L[4][0].img}" alt="">
												  <span>${list1L[4][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img5_3L.classList.add("img1");
            setTimeout(() => {
              ele.img5_3L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_3L.innerHTML = `<p class="img_span">${list1L[4][2].name}</p>
												  <img class="jinbi_img" src="${list1L[4][2].img}" alt="">
												  <span>${list1L[4][2].num}</span>`;
            }, 500);
            ele.img5_1L.classList.add("img1");
            setTimeout(() => {
              ele.img5_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_1L.innerHTML = `<p class="img_span">${list1L[4][1].name}</p>
												  <img class="jinbi_img" src="${list1L[4][1].img}" alt="">
												  <span>${list1L[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 3) {
          showw5 = 1;
          idL = 1;
          stateL = 5;
          // todo调用翻拍接口
          fanpai(1, 3);
          ele.img5_3L.classList.add("img1");
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img5_3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
            ele.img_titbox5_3L.innerHTML = `<p class="img_span">${list1L[4][0].name}</p>
												  <img class="jinbi_img" src="${list1L[4][0].img}" alt="">
												  <span>${list1L[4][0].num}</span> <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code2 == 1) {
              return;
            }
            ele.img5_2L.classList.add("img1");
            setTimeout(() => {
              ele.img5_2L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_2L.innerHTML = `<p class="img_span">${list1L[4][2].name}</p>
												  <img class="jinbi_img" src="${list1L[4][2].img}" alt="">
												  <span>${list1L[4][2].num}</span>`;
            }, 500);
            ele.img5_1L.classList.add("img1");
            setTimeout(() => {
              ele.img5_1L.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/p1.png";
              ele.img_titbox5_1L.innerHTML = `<p class="img_span">${list1L[4][1].name}</p>
												  <img class="jinbi_img" src="${list1L[4][1].img}" alt="">
												  <span>${list1L[4][1].num}</span>`;
            }, 500);
          }, 2000);
        }
      };
    }
    //   !第个页---------------------------------------
    function choujiang7() {
      //   !第一页点击宝箱
      ele.bao_topL.onclick = () => {
        if (paiidL != 6) {
          return;
        }
        idL = 1;
        stateL = 7;
        fanpai(1, 1);
        // !是金币
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          if (
            list1L[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao1L.innerHTML = `
						<span class="num">x${list1L[6][0].num}</span> <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_topL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1L.innerHTML = `<img class="sonbox_img" src="${list1L[6][0].img}" alt="">
																<span class="num">x${list1L[6][0].num}</span> <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_topL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          if (list1L[6][1].name == "金币") {
            ele.son_bao2L.innerHTML = `
						<span class="num">x${list1L[6][1].num}</span>`;
            ele.bao_top2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2L.innerHTML = `<img class="sonbox_img" src="${list1L[6][1].img}" alt="">
																<span class="num">x${list1L[6][1].num}</span>`;
            ele.bao_top2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1L[6][2].name == "金币") {
            ele.son_bao3L.innerHTML = `
						<span class="num">x${list1L[6][2].num}</span>`;
            ele.bao_top3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3L.innerHTML = `<img class="sonbox_img" src="${list1L[6][2].img}" alt="">
																<span class="num">x${list1L[6][2].num}</span>`;
            ele.bao_top3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
      ele.bao_top2L.onclick = () => {
        if (paiidL != 6) {
          return;
        }
        idL = 1;
        stateL = 7;
        fanpai(1, 2);
        // !是金币
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          if (
            list1L[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao2L.innerHTML = `
						<span class="num">x${list1L[6][0].num}</span> <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2L.innerHTML = `<img class="sonbox_img" src="${list1L[6][0].img}" alt="">
																<span class="num">x${list1L[6][0].num}</span> <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          if (list1L[6][1].name == "金币") {
            ele.son_bao3L.innerHTML = `
						<span class="num">x${list1L[6][1].num}</span>`;
            ele.bao_top3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3L.innerHTML = `<img class="sonbox_img" src="${list1L[6][1].img}" alt="">
																<span class="num">x${list1L[6][1].num}</span>`;
            ele.bao_top3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1L[6][2].name == "金币") {
            ele.son_bao1L.innerHTML = `
						<span class="num">x${list1L[6][2].num}</span>`;
            ele.bao_topL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1L.innerHTML = `<img class="sonbox_img" src="${list1L[6][2].img}" alt="">
																<span class="num">x${list1L[6][2].num}</span>`;
            ele.bao_topL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
      ele.bao_top3L.onclick = () => {
        if (paiidL != 6) {
          return;
        }
        idL = 1;
        stateL = 7;
        fanpai(1, 3);
        // !是金币
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          if (
            list1L[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao3L.innerHTML = `
					<span class="num">x${list1L[6][0].num}</span> <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3L.innerHTML = `<img class="sonbox_img" src="${list1L[6][0].img}" alt="">
															<span class="num">x${list1L[6][0].num}</span> <img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top3L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code2 == 1) {
            return;
          }
          if (list1L[6][1].name == "金币") {
            ele.son_bao1L.innerHTML = `
					<span class="num">x${list1L[6][1].num}</span>`;
            ele.bao_topL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1L.innerHTML = `<img class="sonbox_img" src="${list1L[6][1].img}" alt="">
															<span class="num">x${list1L[6][1].num}</span>`;
            ele.bao_topL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1L[6][2].name == "金币") {
            ele.son_bao2L.innerHTML = `
					<span class="num">x${list1L[6][2].num}</span>`;
            ele.bao_top2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2L.innerHTML = `<img class="sonbox_img" src="${list1L[6][2].img}" alt="">
															<span class="num">x${list1L[6][2].num}</span>`;
            ele.bao_top2L.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
    }
  }

  //   !第三个
  function onePage3() {
    ele.chongxinLL = $("#chongxinLL");
    ele.chongkai1LL = $("#chongkai1LL");
    ele.img1_3LL = $("#img1_3LL");
    ele.img1_2LL = $("#img1_2LL");
    ele.img_titbox1_3LL = $("#img_titbox1_3LL");
    ele.img_titbox1_2LL = $("#img_titbox1_2LL");
    ele.img_titbox1_1LL = $("#img_titbox1_1LL");
    ele.img1_1LL = $("#img1_1LL");
    ele.img_titbox2_1LL = $("#img_titbox2_1LL");
    ele.img_titbox2_2LL = $("#img_titbox2_2LL");
    ele.cardboth1LL = $("#cardboth1LL");
    ele.img2_2LL = $("#img2_2LL");
    ele.img2_1LL = $("#img2_1LL");
    ele.img_titbox3_1LL = $("#img_titbox3_1LL");
    ele.img3_2LL = $("#img3_2LL");
    ele.img_titbox3_2LL = $("#img_titbox3_2LL");
    ele.img_titbox3_3LL = $("#img_titbox3_3LL");
    ele.img3_1LL = $("#img3_1LL");
    ele.img3_3LL = $("#img3_3LL");
    ele.cardboth4LL = $("#cardboth4LL");
    ele.img4_1LL = $("#img4_1LL");
    ele.img_titbox4_1LL = $("#img_titbox4_1LL");
    ele.img4_2LL = $("#img4_2LL");
    ele.img_titbox4_2LL = $("#img_titbox4_2LL");
    ele.cardthree3LL = $("#cardthree3LL");
    ele.img5_1LL = $("#img5_1LL");
    ele.cardthree5LL = $("#cardthree5LL");
    ele.img_titbox5_1LL = $("#img_titbox5_1LL");
    ele.img5_2LL = $("#img5_2LL");
    ele.img_titbox5_2LL = $("#img_titbox5_2LL");
    ele.img5_3LL = $("#img5_3LL");
    ele.img_titbox5_3LL = $("#img_titbox5_3LL");
    ele.cardboth6LL = $("#cardboth6LL");
    ele.img6_1LL = $("#img6_1LL");
    ele.img_titbox6_1LL = $("#img_titbox6_1LL");
    ele.img6_2LL = $("#img6_2LL");
    ele.img_titbox6_2LL = $("#img_titbox6_2LL");
    ele.bao_topLL = $("#bao_topLL");
    ele.bao_top3LL = $("#bao_top3LL");
    ele.bao_top2LL = $("#bao_top2LL");
    ele.son_bao1LL = $("#son_bao1LL");
    ele.son_bao2LL = $("#son_bao2LL");
    ele.son_bao3LL = $("#son_bao3LL");
    let list1LL = [];
    //   第一个记录
    let jiluList1 = [];
    let stateLL = 0;
    //   目前在那个等级游戏
    let idLL = 3;
    let idtow = 3;
    let paiidLL = 0;
    let code3 = 0;
    let toId3 = 0;
    let img1All = document.querySelectorAll(".img_1LL");

    // !第三个点击重新开始？？？？？？？？？？？？？？？？？？？？？
    chongkai1LL.onclick = () => {
      upDataL();
      setTimeout(() => {
        onePage3();
        idtow = 3;
        toId3 = 0;
        list1LL = [];

        // !上面的宝箱
        ele.son_bao1LL.innerHTML = " ";
        ele.son_bao2LL.innerHTML = " ";
        ele.son_bao3LL.innerHTML = " ";
        ele.bao_topLL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        ele.bao_top2LL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        ele.bao_top3LL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx1.png";
        // 下面的绿点
        let n = document.querySelectorAll(".img_titboxLL");
        n.forEach((item) => {
          item.innerHTML = " ";
        });
        img1All.forEach((item) => {
          item.classList.remove("img1");
          item.src = "http://img.qxgs.cc/tiantianlaishouzu/img/search/red.png";
        });
      }, 2000);
    };
    // //打开 探索记录
    // for (let i = 0; i < ele.fixedbtn1.length; i++) {
    //   ele.fixedbtn1[i].onclick = (e) => {
    //     openMdl(ele.modal_record);
    //   };
    // }

    // //关闭 探索记录
    // ele.close_record.onclick = () => {
    //   closeMdl(ele.modal_record);
    // };

    // //打开 探索记录
    // for (let i = 0; i < ele.fixedbtn2.length; i++) {
    //   ele.fixedbtn2[i].onclick = (e) => {
    //     openMdl(ele.modal_explian);
    //   };
    // }

    function tansuojilu() {}
    //关闭 探索记录
    ele.close_explian.onclick = () => {
      closeMdl(ele.modal_explian);
    };
    // !翻牌记录!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    jilu();
    function jilu() {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.FANPAIJI,
        header: {
          Authorization: token,
        },
        data: {
          id: idLL,
        },
        success: (res) => {
          if (res.data.list.length == 0) {
            return;
          }
          //   if (idLL == 1) {
          paiidLL = res.data.list.length;
          toId3 = res.data.list.length;
          jiluTree(res.data.list);
          //   渲染数据
          xuanranState();
          //   }
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
    }
    // !用来统计记录-----------
    function jiluTree(list) {
      let newList = [];
      list.forEach((item) => {
        if (item.info.lose.length == 2) {
          newList.push([
            {
              wz: item.wz,
              name: item.info.win.info.b_type
                ? item.info.win.info.name
                : "道具",
              img: item.info.win.info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.win.info.logo,
              num: item.info.win.num,
            },
            {
              name: item.info.lose[0].info.b_type
                ? item.info.lose[0].info.name
                : "道具",
              img: item.info.lose[0].info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.lose[0].info.logo,
              num: item.info.lose[0].num,
            },
            {
              name: item.info.lose[1].info.b_type ? win.info.name : "道具",
              img: item.info.lose[1].info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.lose[1].info.logo,
              num: item.info.lose[1].num,
            },
          ]);
        } else if (item.info.lose.length == 1) {
          newList.push([
            {
              wz: item.wz,
              name: item.info.win.info.b_type
                ? item.info.win.info.name
                : "道具",
              img: item.info.win.info.b_type
                ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
                : IMG_DOMAIN + item.info.win.info.logo,
              num: item.info.win.num,
            },
            {
              name: item.info.lose[0].info.b_type
                ? item.info.lose[0].info.name
                : "道具",
              img: item.info.lose[0].info.logo
                ? IMG_DOMAIN + item.info.lose[0].info.logo
                : "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png",
              num: item.info.lose[0].num,
            },
          ]);
        }
        list1LL = newList;
        return newList;
      });
    }
    //   todo渲染记录----------------------------------------------------------
    function xuanranState() {
      try {
        if (list1LL[0][0].wz == 1) {
          // todo调用翻拍接口
          ele.img1_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img1_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox1_1LL.innerHTML = `<p class="img_span">${list1LL[0][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][0].img}" alt="">
												  <span>${list1LL[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img1_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img1_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox1_3LL.innerHTML = `<p class="img_span">${list1LL[0][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][2].img}" alt="">
												  <span>${list1LL[0][2].num}</span>`;
            }, 500);
            ele.img1_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img1_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox1_2LL.innerHTML = `<p class="img_span">${list1LL[0][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][1].img}" alt="">
												  <span>${list1LL[0][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1LL[0][0].wz == 2) {
          ele.img1_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img1_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox1_2LL.innerHTML = `<p class="img_span">${list1LL[0][0].name}</p>
													  <img class="jinbi_img" src="${list1LL[0][0].img}" alt="">
													  <span>${list1LL[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            idLL = 1;
            ele.img1_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img1_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox1_1LL.innerHTML = `<p class="img_span">${list1LL[0][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][1].img}" alt="">
												  <span>${list1LL[0][1].num}</span>`;
            }, 500);
            ele.img1_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img1_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox1_3LL.innerHTML = `<p class="img_span">${list1LL[0][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][2].img}" alt="">
												  <span>${list1LL[0][2].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1LL[0][0].wz == 3) {
          ele.img1_3LL.classList.add("img1");
          setTimeout(() => {
            ele.img1_3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img1_3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox1_3LL.innerHTML = `<p class="img_span">${list1LL[0][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][0].img}" alt="">
												  <span>${list1LL[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img1_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img1_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox1_1LL.innerHTML = `<p class="img_span">${list1LL[0][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][2].img}" alt="">
												  <span>${list1LL[0][2].num}</span>`;
            }, 500);
            ele.img1_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img1_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox1_2LL.innerHTML = `<p class="img_span">${list1LL[0][1].name}</p>
													  <img class="jinbi_img" src="${list1LL[0][1].img}" alt="">
													  <span>${list1LL[0][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        if (list1LL[1][0].wz == 1) {
          ele.img2_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img2_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox2_1LL.innerHTML = `<p class="img_span">${list1LL[1][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][0].img}" alt="">
												  <span>${list1LL[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img2_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img2_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox2_2LL.innerHTML = `<p class="img_span">${list1LL[1][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][1].img}" alt="">
												  <span>${list1LL[1][1].num}</span>`;
            }, 500);
            ele.img2_2LL.classList.add("img1");
          }, 2000);
        } else if (list1LL[1][0].wz == 2) {
          ele.img2_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img2_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox2_2LL.innerHTML = `<p class="img_span">${list1LL[1][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][0].img}" alt="">
												  <span>${list1LL[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img2_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img2_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox2_1LL.innerHTML = `<p class="img_span">${list1LL[1][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][1].img}" alt="">
												  <span>${list1LL[1][1].num}</span>`;
            }, 500);
            ele.img2_1LL.classList.add("img1");
          }, 2000);
        }
        if (list1LL[2][0].wz == 1) {
          ele.img3_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img3_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox3_1LL.innerHTML = `<p class="img_span">${list1LL[2][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][0].img}" alt="">
												  <span>${list1LL[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img3_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_3LL.innerHTML = `<p class="img_span">${list1LL[2][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][2].img}" alt="">
												  <span>${list1LL[2][2].num}</span>`;
            }, 500);
            ele.img3_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_2LL.innerHTML = `<p class="img_span">${list1LL[2][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][1].img}" alt="">
												  <span>${list1LL[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1LL[0][0].wz == 2) {
          ele.img3_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img3_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox3_2LL.innerHTML = `<p class="img_span">${list1LL[2][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][0].img}" alt="">
												  <span>${list1LL[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img3_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_3LL.innerHTML = `<p class="img_span">${list1LL[2][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][2].img}" alt="">
												  <span>${list1LL[2][2].num}</span>`;
            }, 500);
            ele.img3_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_1LL.innerHTML = `<p class="img_span">${list1LL[2][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][1].img}" alt="">
												  <span>${list1LL[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1LL[0][0].wz == 3) {
          ele.img3_3LL.classList.add("img1");
          setTimeout(() => {
            ele.img3_3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox3_3LL.innerHTML = `<p class="img_span">${list1LL[2][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][0].img}" alt="">
												  <span>${list1LL[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img3_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_2LL.innerHTML = `<p class="img_span">${list1LL[2][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][2].img}" alt="">
												  <span>${list1LL[2][2].num}</span>`;
            }, 500);
            ele.img3_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_1LL.innerHTML = `<p class="img_span">${list1LL[2][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][1].img}" alt="">
												  <span>${list1LL[2][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        // 第四个
        if (list1LL[3][0].wz == 1) {
          // 第四个
          // todo调用翻拍接口
          ele.img4_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img4_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox4_1LL.innerHTML = `<p class="img_span">${list1LL[3][0].name}</p>
													<img class="jinbi_img" src="${list1LL[3][0].img}" alt="">
													<span>${list1LL[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img4_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img4_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox4_2LL.innerHTML = `<p class="img_span">${list1LL[3][1].name}</p>
													<img class="jinbi_img" src="${list1LL[3][1].img}" alt="">
													<span>${list1LL[3][1].num}</span>`;
            }, 500);
            ele.img4_2LL.classList.add("img1");
          }, 2000);
        } else if (list1LL[3][0].wz == 2) {
          ele.img4_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img4_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox4_2LL.innerHTML = `<p class="img_span">${list1LL[3][0].name}</p>
													<img class="jinbi_img" src="${list1LL[3][0].img}" alt="">
													<span>${list1LL[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img4_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img4_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox4_1LL.innerHTML = `<p class="img_span">${list1LL[3][1].name}</p>
													<img class="jinbi_img" src="${list1LL[3][1].img}" alt="">
													<span>${list1LL[3][1].num}</span>`;
            }, 500);
            ele.img4_1LL.classList.add("img1");
          }, 2000);
        }
        // 第五个
        if (list1LL[4][0].wz == 1) {
          ele.img5_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img5_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox5_1LL.innerHTML = `<p class="img_span">${list1LL[4][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][0].img}" alt="">
												  <span>${list1LL[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img5_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_3LL.innerHTML = `<p class="img_span">${list1LL[4][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][2].img}" alt="">
												  <span>${list1LL[4][2].num}</span>`;
            }, 500);
            ele.img5_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_2LL.innerHTML = `<p class="img_span">${list1LL[4][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][1].img}" alt="">
												  <span>${list1LL[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1LL[4][0].wz == 2) {
          ele.img5_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img5_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox5_2LL.innerHTML = `<p class="img_span">${list1LL[4][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][0].img}" alt="">
												  <span>${list1LL[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_3LL.innerHTML = `<p class="img_span">${list1LL[4][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][2].img}" alt="">
												  <span>${list1LL[4][2].num}</span>`;
            }, 500);
            ele.img5_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_1LL.innerHTML = `<p class="img_span">${list1LL[4][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][1].img}" alt="">
												  <span>${list1LL[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (list1LL[4][0].wz == 3) {
          ele.img5_3LL.classList.add("img1");
          setTimeout(() => {
            ele.img5_3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox5_3LL.innerHTML = `<p class="img_span">${list1LL[4][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][0].img}" alt="">
												  <span>${list1LL[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_2LL.innerHTML = `<p class="img_span">${list1LL[4][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][2].img}" alt="">
												  <span>${list1LL[4][2].num}</span>`;
            }, 500);
            ele.img5_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_1LL.innerHTML = `<p class="img_span">${list1LL[4][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][1].img}" alt="">
												  <span>${list1LL[4][1].num}</span>`;
            }, 500);
          }, 2000);
        }
        //   第六个
        if (list1LL[5][0].wz == 1) {
          ele.img6_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img6_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox6_1LL.innerHTML = `<p class="img_span">${list1LL[5][0].name}</p>
													<img class="jinbi_img" src="${list1LL[5][0].img}" alt="">
													<span>${list1LL[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img6_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img6_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox6_2LL.innerHTML = `<p class="img_span">${list1LL[5][1].name}</p>
													<img class="jinbi_img" src="${list1LL[5][1].img}" alt="">
													<span>${list1LL[5][1].num}</span>`;
            }, 500);
            ele.img6_2LL.classList.add("img1");
          }, 2000);
        } else if (list1LL[5][0].wz == 2) {
          ele.img6_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img6_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox6_2LL.innerHTML = `<p class="img_span">${list1LL[5][0].name}</p>
													<img class="jinbi_img" src="${list1LL[5][0].img}" alt="">
													<span>${list1LL[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 500);
          // todo打开其他两个
          setTimeout(() => {
            ele.img6_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img6_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox6_1LL.innerHTML = `<p class="img_span">${list1LL[5][1].name}</p>
													<img class="jinbi_img" src="${list1LL[5][0].img}" alt="">
													<span>${list1LL[5][1].num}</span>`;
            }, 500);
            ele.img6_1LL.classList.add("img1");
          }, 2000);
        }
        // 第七个
        if (list1LL[6][0].wz == 1) {
          setTimeout(() => {
            if (
              list1LL[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao1LL.innerHTML = `
						<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_topLL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][0].img}" alt="">
																<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_topLL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1LL[6][1].name == "金币") {
              ele.son_bao2LL.innerHTML = `
						<span class="num">x${list1LL[6][1].num}</span>`;
              ele.bao_top2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][1].img}" alt="">
																<span class="num">x${list1LL[6][1].num}</span>`;
              ele.bao_top2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1LL[6][2].name == "金币") {
              ele.son_bao3LL.innerHTML = `
						<span class="num">x${list1LL[6][2].num}</span>`;
              ele.bao_top3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][2].img}" alt="">
																<span class="num">x${list1LL[6][2].num}</span>`;
              ele.bao_top3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        } else if (list1LL[6][0].wz == 2) {
          setTimeout(() => {
            if (
              list1LL[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao2LL.innerHTML = `
						<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][0].img}" alt="">
																<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1LL[6][1].name == "金币") {
              ele.son_bao3LL.innerHTML = `
						<span class="num">x${list1LL[6][1].num}</span>`;
              ele.bao_top3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][1].img}" alt="">
																<span class="num">x${list1LL[6][1].num}</span>`;
              ele.bao_top3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1LL[6][2].name == "金币") {
              ele.son_bao1LL.innerHTML = `
						<span class="num">x${list1LL[6][2].num}</span>`;
              ele.bao_topLL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][2].img}" alt="">
																<span class="num">x${list1LL[6][2].num}</span>`;
              ele.bao_topLL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        } else if (list1LL[6][0].wz == 3) {
          // !是金币
          setTimeout(() => {
            if (
              list1LL[6][0].img ==
              "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
            ) {
              ele.son_bao3LL.innerHTML = `
					<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao3LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][0].img}" alt="">
															<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
              ele.bao_top3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 500);
          // 打开其他两个
          setTimeout(() => {
            if (list1LL[6][1].name == "金币") {
              ele.son_bao1LL.innerHTML = `
					<span class="num">x${list1LL[6][1].num}</span>`;
              ele.bao_topLL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao1LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][1].img}" alt="">
															<span class="num">x${list1LL[6][1].num}</span>`;
              ele.bao_topLL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
            if (list1LL[6][2].name == "金币") {
              ele.son_bao2LL.innerHTML = `
					<span class="num">x${list1LL[6][2].num}</span>`;
              ele.bao_top2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
            } else {
              ele.son_bao2LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][2].img}" alt="">
															<span class="num">x${list1LL[6][2].num}</span>`;
              ele.bao_top2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
            }
          }, 2000);
        }
      } catch (error) {}
    }
    // ! 重新开始
    function upDataL() {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.CHONGXINKAISHI,
        header: {
          Authorization: token,
        },
        data: {
          lv: idtow,
        },
        success: (res) => {
          openTips(res.msg);
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
    }
    //   !第一页第一个--------------------------------------------------------------------

    ele.img1_1LL.onclick = () => {
      idLL = 1;
      stateLL = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 1, 1);
      if (n == 1) {
        return;
      }
      ele.img1_3LL.onclick = null;
      ele.img1_2LL.onclick = null;
      ele.img1_1LL.classList.add("img1");

      setTimeout(() => {
        if (code3 == 1) {
          return;
        }
        if (paiidLL == 0) {
          return;
        }
        ele.img1_1LL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
        ele.img_titbox1_1LL.innerHTML = `<p class="img_span">${list1LL[0][0].name}</p>
		  
												  <img class="jinbi_img" src="${list1LL[0][0].img}" alt="">
												  <span>${list1LL[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        openTips(`恭喜获得${list1LL[0][0].name}x${list1LL[0][0].num}`);
      }, 500);
      // todo打开其他两个
      setTimeout(() => {
        if (paiidLL == 0) {
          return;
        }
        if (code3 == 1) {
          return;
        }
        ele.img1_3LL.classList.add("img1");
        setTimeout(() => {
          ele.img1_3LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox1_3LL.innerHTML = `<p class="img_span">${list1LL[0][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][2].img}" alt="">
												  <span>${list1LL[0][2].num}</span>`;
        }, 500);
        ele.img1_2LL.classList.add("img1");
        setTimeout(() => {
          ele.img1_2LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox1_2LL.innerHTML = `<p class="img_span">${list1LL[0][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][1].img}" alt="">
												  <span>${list1LL[0][1].num}</span>`;
        }, 500);
      }, 2000);
    };
    //   !第一页第二个
    ele.img1_2LL.onclick = () => {
      idLL = 1;
      stateLL = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 2);
      if (n == 1) {
        return;
      }
      ele.img1_3LL.onclick = null;
      ele.img1_1LL.onclick = null;
      ele.img1_2LL.classList.add("img1");
      setTimeout(() => {
        if (paiidLL == 0) {
          return;
        }
        if (code3 == 1) {
          return;
        }
        ele.img1_2LL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
        ele.img_titbox1_2LL.innerHTML = `<p class="img_span">${list1LL[0][0].name}</p>
													  <img class="jinbi_img" src="${list1LL[0][0].img}" alt="">
													  <span>${list1LL[0][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
      }, 500);
      // todo打开其他两个
      setTimeout(() => {
        if (paiidLL == 0) {
          return;
        }
        if (code3 == 1) {
          return;
        }
        idLL = 1;
        ele.img1_1LL.classList.add("img1");
        setTimeout(() => {
          ele.img1_1LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox1_1LL.innerHTML = `<p class="img_span">${list1LL[0][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][1].img}" alt="">
												  <span>${list1LL[0][1].num}</span>`;
        }, 500);
        ele.img1_3LL.classList.add("img1");
        setTimeout(() => {
          ele.img1_3LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox1_3LL.innerHTML = `<p class="img_span">${list1LL[0][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][2].img}" alt="">
												  <span>${list1LL[0][2].num}</span>`;
        }, 500);
      }, 2000);
    };
    //   !第一页第三个
    ele.img1_3LL.onclick = () => {
      idLL = 1;
      stateLL = 1;
      // todo调用翻拍接口
      let n = fanpai(1, 3);
      if (n == 1) {
        return;
      }
      ele.img1_1LL.onclick = null;
      ele.img1_2LL.onclick = null;
      ele.img1_3LL.classList.add("img1");
      setTimeout(() => {
        if (paiidLL == 0) {
          return;
        }
        if (code3 == 1) {
          return;
        }
        ele.img1_3LL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
        ele.img1_3LL.src =
          "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
        ele.img_titbox1_3LL.innerHTML = `<p class="img_span">${list1LL[0][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][0].img}" alt="">
												  <span>${list1LL[0][0].num}</span>
                          <img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">
                          `;
      }, 500);
      // todo打开其他两个
      setTimeout(() => {
        if (paiidLL == 0) {
          return;
        }
        if (code3 == 1) {
          return;
        }
        ele.img1_1LL.classList.add("img1");
        setTimeout(() => {
          ele.img1_1LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox1_1LL.innerHTML = `<p class="img_span">${list1LL[0][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[0][2].img}" alt="">
												  <span>${list1LL[0][2].num}</span>`;
        }, 500);
        ele.img1_2LL.classList.add("img1");
        setTimeout(() => {
          ele.img1_2LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox1_2LL.innerHTML = `<p class="img_span">${list1LL[0][1].name}</p>
													  <img class="jinbi_img" src="${list1LL[0][1].img}" alt="">
													  <span>${list1LL[0][1].num}</span>`;
        }, 500);
      }, 2000);
    };
    let showww2 = 2;
    //   !第二个翻拍------------------------------------------------------------------
    ele.cardboth1LL.onclick = (e) => {
      if (toId3 == 0) return;
      if (showww2 == 1) {
        ele.cardboth1LL.onclick = null;
        return;
      }
      if (paiidLL != 1) {
        return;
      }
      if (e.target.dataset.num == 1) {
        showww2 = 1;

        console.log("123");
        idLL = 1;
        stateLL = 2;
        // todo调用翻拍接口
        let n = fanpai(1, 1);
        if (n == 1) {
          return;
        }
        ele.img2_1LL.classList.add("img1");
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img2_1LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox2_1LL.innerHTML = `<p class="img_span">${list1LL[1][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][0].img}" alt="">
												  <span>${list1LL[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 1000);
        // todo打开其他两个
        setTimeout(() => {
          ele.img2_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img2_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox2_2LL.innerHTML = `<p class="img_span">${list1LL[1][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][1].img}" alt="">
												  <span>${list1LL[1][1].num}</span>`;
          }, 500);
          ele.img2_2LL.classList.add("img1");
        }, 2000);
        return;
      } else {
        showww2 = 1;
        if (toId3 == 0) return;
        idLL = 1;
        stateLL = 2;
        // todo调用翻拍接口
        let n = fanpai(1, 2);
        if (n == 1) {
          return;
        }
        ele.img2_2LL.classList.add("img1");
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img2_2LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox2_2LL.innerHTML = `<p class="img_span">${list1LL[1][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][0].img}" alt="">
												  <span>${list1LL[1][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 1000);
        // todo打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img2_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img2_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox2_1LL.innerHTML = `<p class="img_span">${list1LL[1][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[1][1].img}" alt="">
												  <span>${list1LL[1][1].num}</span>`;
          }, 500);
          ele.img2_1LL.classList.add("img1");
        }, 2000);
        return;
      }
    };
    let showww4 = 2;
    //   !第四个翻拍------------------------------------------------------------------
    ele.cardboth4LL.onclick = (e) => {
      if (showww4 == 1) {
        ele.cardboth4LL.onclick = null;
        return;
      }
      if (paiidLL != 3) {
        return;
      }
      if (e.target.dataset.num == 1) {
        showww4 = 1;
        idLL = 1;
        stateLL = 4;
        // todo调用翻拍接口
        let n = fanpai(1, 1);
        if (n == 1) {
          return;
        }
        ele.img4_1LL.classList.add("img1");
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img4_1LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox4_1LL.innerHTML = `<p class="img_span">${list1LL[3][0].name}</p>
													<img class="jinbi_img" src="${list1LL[3][0].img}" alt="">
													<span>${list1LL[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 1000);
        // todo打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img4_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img4_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox4_2LL.innerHTML = `<p class="img_span">${list1LL[3][1].name}</p>
													<img class="jinbi_img" src="${list1LL[3][1].img}" alt="">
													<span>${list1LL[3][1].num}</span>`;
          }, 500);
          ele.img4_2LL.classList.add("img1");
        }, 2000);
        return;
      } else {
        showww4 = 1;
        idLL = 1;
        stateLL = 4;
        // todo调用翻拍接口
        let n = fanpai(1, 2);
        if (n == 1) {
          return;
        }
        ele.img4_2LL.classList.add("img1");
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img4_2LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox4_2LL.innerHTML = `<p class="img_span">${list1LL[3][0].name}</p>
													<img class="jinbi_img" src="${list1LL[3][0].img}" alt="">
													<span>${list1LL[3][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 1000);
        // todo打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img4_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img4_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox4_1LL.innerHTML = `<p class="img_span">${list1LL[3][1].name}</p>
													<img class="jinbi_img" src="${list1LL[3][1].img}" alt="">
													<span>${list1LL[3][1].num}</span>`;
          }, 500);
          ele.img4_1LL.classList.add("img1");
        }, 2000);
        return;
      }
    };
    let showww6 = 2;
    //   !第六个翻拍------------------------------------------------------------------
    ele.cardboth6LL.onclick = (e) => {
      if (showww6 == 1) {
        ele.cardboth6LL.onclick = null;
        return;
      }
      if (paiidLL != 5) {
        return;
      }
      if (e.target.dataset.num == 1) {
        showww6 = 1;
        idLL = 1;
        stateLL = 6;
        // todo调用翻拍接口
        let n = fanpai(1, 1);
        if (n == 1) {
          return;
        }
        ele.img6_1LL.classList.add("img1");
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img6_1LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox6_1LL.innerHTML = `<p class="img_span">${list1LL[5][0].name}</p>
													<img class="jinbi_img" src="${list1LL[5][0].img}" alt="">
													<span>${list1LL[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 1000);
        // todo打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img6_2LL.classList.add("img1");
          setTimeout(() => {
            ele.img6_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox6_2LL.innerHTML = `<p class="img_span">${list1LL[5][1].name}</p>
													<img class="jinbi_img" src="${list1LL[5][1].img}" alt="">
													<span>${list1LL[5][1].num}</span>`;
          }, 500);
          ele.img6_2LL.classList.add("img1");
        }, 2000);
        return;
      } else {
        showww6 = 1;
        idLL = 1;
        stateLL = 6;
        // todo调用翻拍接口
        let n = fanpai(1, 2);
        if (n == 1) {
          return;
        }
        ele.img6_2LL.classList.add("img1");
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img6_2LL.src =
            "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
          ele.img_titbox6_2LL.innerHTML = `<p class="img_span">${list1LL[5][0].name}</p>
													<img class="jinbi_img" src="${list1LL[5][0].img}" alt="">
													<span>${list1LL[5][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
        }, 1000);
        // todo打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          ele.img6_1LL.classList.add("img1");
          setTimeout(() => {
            ele.img6_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox6_1LL.innerHTML = `<p class="img_span">${list1LL[5][1].name}</p>
													<img class="jinbi_img" src="${list1LL[5][1].img}" alt="">
													<span>${list1LL[5][1].num}</span>`;
          }, 500);
          ele.img6_1LL.classList.add("img1");
        }, 2000);
        return;
      }
    };
    //! 第三个翻牌----------------------------------------------------------------
    choujiang3();
    //! 第五个翻牌----------------------------------------------------------------
    choujiang5();
    //   !第七个---------------------------------------------------------------=----
    choujiang7();
    function fanpai(idnum, weizhi) {
      let token = getCookie("token");
      ajax({
        method: "get",
        url: API_PATH.FANPAIJILU,
        header: {
          Authorization: token,
        },
        data: {
          lv: idtow,
          cen: stateLL,
          wz: weizhi,
        },
        success: (res) => {
          if (res.code == 1) {
            openTips(`恭喜获得${res.data.win.info.name}x${res.data.win.num}`);
          }
          if (res.msg == "能量不足！") {
            code3 = 1;
            openTips(res.msg);
            return 1;
          }
          if (res.code == 0) {
            // paiidLL = 0;
            return openTips(res.msg);
          } else {
            setTimeout(() => {
              toId3 = 1;
            }, 2000);
            code3 = 2;
            paiidLL = 1;
          }
          let lostLis = res.data.lose;
          let win = res.data.win;
          if (idnum == 1 && stateLL == 1) {
            // !说明是第一个游戏第一个关卡
            list1fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 1;
            }, 1000);
          } else if (idnum == 1 && stateLL == 2) {
            // !说明是第一个游戏第二个关卡
            list2fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 2;
            }, 1500);
          } else if (idnum == 1 && stateLL == 3) {
            list1fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 3;
            }, 1500);
          } else if (idnum == 1 && stateLL == 4) {
            list2fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 4;
            }, 1500);
          } else if (idnum == 1 && stateLL == 5) {
            list1fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 5;
            }, 1500);
          } else if (idnum == 1 && stateLL == 6) {
            list2fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 6;
            }, 1500);
          } else if (idnum == 1 && stateLL == 7) {
            list1fu(lostLis, win);
            setTimeout(() => {
              paiidLL = 7;
            }, 1500);
          }
        },
        error: (err) => {
          // openTips(err.msg);
        },
      });
      // !三个的数据
      function list1fu(lostLis, win) {
        list1LL.push([
          {
            name: win.info.b_type ? win.info.name : "道具",
            img: win.info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + win.info.logo,
            num: win.num,
          },
          {
            name: lostLis[0].info.b_type ? win.info.name : "道具",
            img: lostLis[0].info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + lostLis[0].info.logo,
            num: lostLis[0].num,
          },
          {
            name: lostLis[1].info.b_type ? win.info.name : "道具",
            img: lostLis[1].info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + lostLis[1].info.logo,
            num: lostLis[1].num,
          },
        ]);
      }
      // !两个的数据
      function list2fu(lostLis, win) {
        list1LL.push([
          {
            name: win.info.b_type ? win.info.name : "道具",
            img: win.info.b_type
              ? "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
              : IMG_DOMAIN + win.info.logo,
            num: win.num,
          },
          {
            name: lostLis[0].info.b_type ? win.info.name : "道具",
            img: lostLis[0].info.logo
              ? IMG_DOMAIN + lostLis[0].info.logo
              : "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png",
            num: lostLis[0].num,
          },
        ]);
      }
    }

    function choujiang3() {
      //   !第三个翻拍--------------------------------------------------------------------------
      let showww3 = 2;
      ele.cardthree3LL.onclick = (e) => {
        if (showww3 == 1) {
          return;
        }
        if (paiidLL != 2) {
          return;
        }
        if (e.target.dataset.num == 1) {
          showww3 = 1;
          idLL = 1;
          stateLL = 3;
          // todo调用翻拍接口
          let n = fanpai(1, 1);
          if (n == 1) {
            return;
          }
          ele.img3_1LL.classList.add("img1");
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img3_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox3_1LL.innerHTML = `<p class="img_span">${list1LL[2][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][0].img}" alt="">
												  <span>${list1LL[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img3_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_3LL.innerHTML = `<p class="img_span">${list1LL[2][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][2].img}" alt="">
												  <span>${list1LL[2][2].num}</span>`;
            }, 500);
            ele.img3_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_2LL.innerHTML = `<p class="img_span">${list1LL[2][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][1].img}" alt="">
												  <span>${list1LL[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 2) {
          showww3 = 1;
          idLL = 1;
          stateLL = 3;
          // todo调用翻拍接口
          let n = fanpai(1, 2);
          if (n == 1) {
            return;
          }
          ele.img3_2LL.classList.add("img1");
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img3_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox3_2LL.innerHTML = `<p class="img_span">${list1LL[2][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][0].img}" alt="">
												  <span>${list1LL[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img3_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_3LL.innerHTML = `<p class="img_span">${list1LL[2][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][2].img}" alt="">
												  <span>${list1LL[2][2].num}</span>`;
            }, 500);
            ele.img3_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_1LL.innerHTML = `<p class="img_span">${list1LL[2][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][1].img}" alt="">
												  <span>${list1LL[2][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 3) {
          showww3 = 1;
          idLL = 1;
          stateLL = 3;
          // todo调用翻拍接口
          let n = fanpai(1, 3);
          if (n == 1) {
            return;
          }
          ele.img3_3LL.classList.add("img1");
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img3_3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox3_3LL.innerHTML = `<p class="img_span">${list1LL[2][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][0].img}" alt="">
												  <span>${list1LL[2][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 900);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img3_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_2LL.innerHTML = `<p class="img_span">${list1LL[2][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][2].img}" alt="">
												  <span>${list1LL[2][2].num}</span>`;
            }, 500);
            ele.img3_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img3_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox3_1LL.innerHTML = `<p class="img_span">${list1LL[2][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[2][1].img}" alt="">
												  <span>${list1LL[2][1].num}</span>`;
            }, 500);
          }, 2000);
        }
      };
    }
    function choujiang5() {
      let showww5 = 2;
      //   !第五个翻拍--------------------------------------------------------------------------
      ele.cardthree5LL.onclick = (e) => {
        if (showww5 == 1) return;
        if (paiidLL != 4) {
          return;
        }
        if (e.target.dataset.num == 1) {
          showww5 = 1;
          idLL = 1;
          stateLL = 5;
          // todo调用翻拍接口
          let n = fanpai(1, 1);
          if (n == 1) {
            return;
          }
          ele.img5_1LL.classList.add("img1");
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img5_1LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox5_1LL.innerHTML = `<p class="img_span">${list1LL[4][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][0].img}" alt="">
												  <span>${list1LL[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img5_3LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_3LL.innerHTML = `<p class="img_span">${list1LL[4][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][2].img}" alt="">
												  <span>${list1LL[4][2].num}</span>`;
            }, 500);
            ele.img5_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_2LL.innerHTML = `<p class="img_span">${list1LL[4][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][1].img}" alt="">
												  <span>${list1LL[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 2) {
          showww5 = 1;
          idLL = 1;
          stateLL = 5;
          // todo调用翻拍接口
          let n = fanpai(1, 2);
          if (n == 1) {
            return;
          }
          ele.img5_2LL.classList.add("img1");
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img5_2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox5_2LL.innerHTML = `<p class="img_span">${list1LL[4][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][0].img}" alt="">
												  <span>${list1LL[4][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 1000);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            ele.img5_3LL.classList.add("img1");
            setTimeout(() => {
              if (code3 == 1) {
                return;
              }
              ele.img5_3LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_3LL.innerHTML = `<p class="img_span">${list1LL[4][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][2].img}" alt="">
												  <span>${list1LL[4][2].num}</span>`;
            }, 500);
            ele.img5_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_1LL.innerHTML = `<p class="img_span">${list1LL[4][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][1].img}" alt="">
												  <span>${list1LL[4][1].num}</span>`;
            }, 500);
          }, 2000);
        } else if (e.target.dataset.num == 3) {
          showww5 = 1;
          idLL = 1;
          stateLL = 5;
          // todo调用翻拍接口
          let n = fanpai(1, 3);
          if (n == 1) {
            return;
          }
          ele.img5_3LL.classList.add("img1");
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img5_3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
            ele.img_titbox5_3LL.innerHTML = `<p class="img_span">${list1LL[4][0].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][0].img}" alt="">
												  <span>${list1LL[4][0].num}</span><img class="jinbi_imgs" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
          }, 00);
          // todo打开其他两个-------------------------------------------
          setTimeout(() => {
            if (code3 == 1) {
              return;
            }
            ele.img5_2LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_2LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_2LL.innerHTML = `<p class="img_span">${list1LL[4][2].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][2].img}" alt="">
												  <span>${list1LL[4][2].num}</span>`;
            }, 500);
            ele.img5_1LL.classList.add("img1");
            setTimeout(() => {
              ele.img5_1LL.src =
                "http://img.qxgs.cc/tiantianlaishouzu/img/search/r1.png";
              ele.img_titbox5_1LL.innerHTML = `<p class="img_span">${list1LL[4][1].name}</p>
												  <img class="jinbi_img" src="${list1LL[4][1].img}" alt="">
												  <span>${list1LL[4][1].num}</span>`;
            }, 500);
          }, 2000);
        }
      };
    }
    //   !第个页---------------------------------------
    function choujiang7() {
      //   !第一页点击宝箱
      ele.bao_topLL.onclick = () => {
        if (paiidLL != 6) {
          return;
        }
        idLL = 1;
        stateLL = 7;
        let n = fanpai(1, 1);
        if (n == 1) {
          return;
        }
        // !是金币
        ele.bao_top2LL.onclick = null;
        ele.bao_top3LL.onclick = null;
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          if (
            list1LL[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao1LL.innerHTML = `
						<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_topLL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][0].img}" alt="">
																<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_topLL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          if (list1LL[6][1].name == "金币") {
            ele.son_bao2LL.innerHTML = `
						<span class="num">x${list1LL[6][1].num}</span>`;
            ele.bao_top2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][1].img}" alt="">
																<span class="num">x${list1LL[6][1].num}</span>`;
            ele.bao_top2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1LL[6][2].name == "金币") {
            ele.son_bao3LL.innerHTML = `
						<span class="num">x${list1LL[6][2].num}</span>`;
            ele.bao_top3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][2].img}" alt="">
																<span class="num">x${list1LL[6][2].num}</span>`;
            ele.bao_top3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
      ele.bao_top2LL.onclick = () => {
        if (paiidLL != 6) {
          return;
        }
        idLL = 1;
        stateLL = 7;
        let n = fanpai(1, 2);
        if (n == 1) {
          return;
        }
        // !是金币
        ele.bao_topLL.onclick = null;
        ele.bao_top3LL.onclick = null;
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          if (
            list1LL[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao2LL.innerHTML = `
						<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][0].img}" alt="">
																<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          if (list1LL[6][1].name == "金币") {
            ele.son_bao3LL.innerHTML = `
						<span class="num">x${list1LL[6][1].num}</span>`;
            ele.bao_top3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][1].img}" alt="">
																<span class="num">x${list1LL[6][1].num}</span>`;
            ele.bao_top3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1LL[6][2].name == "金币") {
            ele.son_bao1LL.innerHTML = `
						<span class="num">x${list1LL[6][2].num}</span>`;
            ele.bao_topLL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][2].img}" alt="">
																<span class="num">x${list1LL[6][2].num}</span>`;
            ele.bao_topLL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
      ele.bao_top3LL.onclick = () => {
        if (paiidLL != 6) {
          return;
        }
        idLL = 1;
        stateLL = 7;
        let n = fanpai(1, 3);
        if (n == 1) {
          return;
        }
        ele.bao_top2LL.onclick = null;
        ele.bao_topLL.onclick = null;
        // !是金币
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          if (
            list1LL[6][0].img ==
            "http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png"
          ) {
            ele.son_bao3LL.innerHTML = `
					<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao3LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][0].img}" alt="">
															<span class="num">x${list1LL[6][0].num}</span><img class="jinbi_imgss" src="http://img.qxgs.cc/tiantianlaishouzu/img/mine/dui.png" alt="">`;
            ele.bao_top3LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 500);
        // 打开其他两个
        setTimeout(() => {
          if (code3 == 1) {
            return;
          }
          if (list1LL[6][1].name == "金币") {
            ele.son_bao1LL.innerHTML = `
					<span class="num">x${list1LL[6][1].num}</span>`;
            ele.bao_topLL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao1LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][1].img}" alt="">
															<span class="num">x${list1LL[6][1].num}</span>`;
            ele.bao_topLL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
          if (list1LL[6][2].name == "金币") {
            ele.son_bao2LL.innerHTML = `
					<span class="num">x${list1LL[6][2].num}</span>`;
            ele.bao_top2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx2.png";
          } else {
            ele.son_bao2LL.innerHTML = `<img class="sonbox_img" src="${list1LL[6][2].img}" alt="">
															<span class="num">x${list1LL[6][2].num}</span>`;
            ele.bao_top2LL.src =
              "http://img.qxgs.cc/tiantianlaishouzu/img/search/bx3.png";
          }
        }, 2000);
      };
    }
  }
})();
